开发者

url rewriting on localhost

开发者 https://www.devze.com 2023-03-26 11:23 出处:网络
I have WAMP installed on my local machine. I have configured the apache module for rewrite_mod and trying a very basic example开发者_Python百科 to redirect

I have WAMP installed on my local machine. I have configured the apache module for rewrite_mod and trying a very basic example开发者_Python百科 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消