hey all, I'm developing a new website in php/mysql and wanted to make sure that I build it using friendly urls. This is on a RHEL dedicated server with virtual hosting set up in Plesk. I've checked and mod_rewrite is on. I tried setting up a .htaccess file on the domain name. http://www.mydomain.com/new/ .htaccess contents: Options +FollowSymlinks RewriteEngine on RewriteRule ^browse/([0-9]+)\.html$ /browse.php?cat=$1 Basically I want to make sure that the following link: http://www.mydomain.com/new/browse.php?cat=2 is being rewritten to: http://www.mydomain.com/new/browse/2.html I have stopped > restarted apache but I am getting a 404. It seems that apache is completely ignoring the .htaccess file. Any help is greatly appreciated. c
First important thing to remember is that .htaccess files are read on the fly. No need to restart Apache. Second, I think you are not escaping the / after browse and you are redirecting to /browse.php while I think the browse.php is within the new folder. Try it like this instead: RewriteRule ^browse\/([0-9]+)\.html$ browse.php?cat=$1