warid7840288 Posted April 9, 2007 Share Posted April 9, 2007 http://abantrentacar.com/index.php?action=home http://abantrentacar.com/index.php?action=reservation&step=1 i have the above and trying to rewrite through the htaccess file to http://abantrentacar.com/home http://abantrentacar.com/reservation/1 here is my code RewriteEngine on RewriteRule ^action/([^/\.]+)/?$ index.php?action=$1 [L] Link to comment https://forums.phpfreaks.com/topic/46240-mod_rewrite-rule/ Share on other sites More sharing options...
veridicus Posted April 9, 2007 Share Posted April 9, 2007 What you've written catches /action/xyz/ and redirects to index.php. I think what you want is something like RewriteRule ^([^/]+)$ index.php?action=$1 [L] RewriteRule ^([^/]+)/(.*)$ index.php?action=$1&step=$2 [L] Link to comment https://forums.phpfreaks.com/topic/46240-mod_rewrite-rule/#findComment-224953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.