url rewriting on localhost

戏子无情 提交于 2019-12-25 03:53:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!