Reputation: 125
I have website that is using unfriendly URLs and I want to change them using mod_rewrite.
I have a URL like this:
http://www.website.nl/?p=2
and I want it to be
http://www.website.nl/about-us
When I use this on my local server it works correct but on the live webserver it doesnt
I use this code in my .htaccess:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^about-us$ /?p=2 [L]
I already checked if mod_rewrite is enabled and in my apache2handler it is enabled so it should work shouldn't it?
What am I missing or doing wrong?
Upvotes: 3
Views: 748
Reputation: 11588
You may be missing the leading /
(forward slash) in your pattern, try:
RewriteRule ^/about-us$ /?p=2 [L]
Upvotes: 1