EvanAgee Posted March 4, 2008 Share Posted March 4, 2008 Hello all, So I've got a PHP file, index.php that I'm using for all of my various run modes, one of which is a site search. I'm using Mod Rewrite to point domain.com/search/?s=Term to the true URL of domain.com/index.php?action=search&s=Term That's all working fine. However, I want to take it a step further and instead make the rewrite rule create a URL that looks like this: domain.com/search/Term.php Anyone help me out with the syntax for doing this? Link to comment https://forums.phpfreaks.com/topic/94258-mod-rewrite-help/ Share on other sites More sharing options...
blackwinter Posted March 6, 2008 Share Posted March 6, 2008 This should be your code RewriteEngine on RewriteRule ^/([^/\.]+)/([^/\.]+).php?$ /$1/\?s=$2 Link to comment https://forums.phpfreaks.com/topic/94258-mod-rewrite-help/#findComment-485066 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.