views:

150

answers:

3

I am not able to get URL redirection to work. It appears to be a problem with my .htaccess file. I am using WampServer.

Following is the code in .htaccess:

RewriteEngine on
RewriteRule ^contactus index.php?file=c-contactus
+2  A: 

put a / before index.php?file=c-contactus

so it becomes:

/index.php?file=c-contactus

or

RewriteRule ^contactus$ index.php?file=c-contactus
Time Machine
still It's not working!
edited, does your request end with a slash? If so, it will not work.
Time Machine
Remove the $ from the RewriteRule Above, or use mrinject's optional /
maxwellb
+2  A: 
RewriteRule ^/?contactus(/)?$ index.php?file=c-contactus
mrinject
+1  A: 

Try:


RewriteRule ^/contactus(.*) /index.php?file=c-contactus
vh