问题
I have WAMP installed on my local machine. I have configured the apache module for rewrite_mod and trying a very basic example to redirect
RewriteEngine on
RewriteRule ^alice.html$ bob.html
As per this rule when I hit alice.html I should be viewing bob.html content. But, I think the url rewriting is not effective.
I have /test folder placed under www and alice.html and bob.html both are place inside the test folder.
Any advice to resolve this.
Thanks
This is resolved.
回答1:
Did you enable the mod_rewrite module for Apache ? You need to enable this module for using rewrite directives. Don't forget to restart Apache after enabling the module.
来源:https://stackoverflow.com/questions/6944521/url-rewriting-on-localhost