wilsonf1 Posted August 11, 2011 Share Posted August 11, 2011 Hi!I have a rewrite rule that picks up a .htm page and puts the file name onto a querystring on a php page:RewriteRule ^([^/\.]+).htm$ page.php?for=$1 [L]Am I able to setup a new rule that looks for a set query string on the .htm file and rewrites to a different php file.So amazon.htm currently rewrites to page.php?for=amazonI want:amazon.htm?flag=true to write to newpage.php?for=amazon Link to comment Share on other sites More sharing options...
wilsonf1 Posted August 11, 2011 Author Share Posted August 11, 2011 Or.... Can I just adding a query string value onto the rewrite I already have?So something like:RewriteRule ^([^/\.]+).htm?mobile=true$ page.php?for=$1&mobile=true [L](only that doesnt work!!) Link to comment Share on other sites More sharing options...
Ingolme Posted August 11, 2011 Share Posted August 11, 2011 Adding the QSA modifier will make it include the query string in the URL to rewrite:RewriteRule ^([^/\.]+).htm$ page.php?for=$1 [QSA] Link to comment Share on other sites More sharing options...
wilsonf1 Posted August 11, 2011 Author Share Posted August 11, 2011 Adding the QSA modifier will make it include the query string in the URL to rewrite:RewriteRule ^([^/\.]+).htm$ page.php?for=$1 [QSA]Perfect thanks mate! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.