Jump to content

Mod_rewrite help


c_pattle

Recommended Posts

I'm trying to use mod_rewrite to rewrite my urls.  At the moment the url I want to rewrite is

 

http://localhost/web/index.php?colour=red

 

and I want to change it to

 

http://localhost/web/colour/red

 

I've uploaded a .htaccess file to the "web" directory but I keep getting a 404 error page.  I've included the contents of my .htaccess file below. 

 

RewriteEngine on

RewriteRule ^/colour/([A-Za-z0-9]+)$ /?colour=$1

 

 

Thanks for any help

Link to comment
https://forums.phpfreaks.com/topic/238233-mod_rewrite-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.