0

I´m trying to do a simple redirection with Apache2 with mod_rewrite. I've installed the module in my Apache and I´ve set a webpage in localhost/file1/file2/page.html. I´m writing this in my 000-default file:

RewriteEngine On
RewriteRule elegantdirectory/page.html file1/file2/page.html [L,NC]

So now if I try to access to localhost/elegantdirectory/page.html, the server is supposed to show me the page.html I have in file1/file2. Any ideas why isn't it working?

4

1 回答 1

0

尝试在您的 : 中包含边界和前导斜杠RewriteRule

RewriteRule ^/elegantdirectory/page.html$ /file1/file2/page.html [L,NC]
于 2012-10-02T23:12:23.593 回答