dreamwest Posted May 7, 2010 Share Posted May 7, 2010 I have this rewrite RewriteRule ^Movies=view&search=(.*) index_films.php?search=$1&type=Movies [L,QSA] But if the url is: /Movies=view&search=test/ The page returns a 404 I should just need some regex to fix this but im not sure what to do Link to comment https://forums.phpfreaks.com/topic/200997-404-not-found-htaccess/ Share on other sites More sharing options...
cags Posted May 7, 2010 Share Posted May 7, 2010 Neither = nor & are valid in a URL outside of the query string. RewriteRule doesn't match against the query string, you need to use RewriteConds to do that. Link to comment https://forums.phpfreaks.com/topic/200997-404-not-found-htaccess/#findComment-1054551 Share on other sites More sharing options...
dreamwest Posted May 10, 2010 Author Share Posted May 10, 2010 With the rewrite i currently have: RewriteRule ^Movies=view&search=(.*) index_films.php?search=$1&type=Movies [L,QSA] All these urls work fine: Movies=view&search=terminator Movies=cast&search=jim+carrey Movies=view&search=dante\'s+inferno So your saying none of these should work? I still cant get my head around RewriteConds , can you give me a simple example of how it works? Link to comment https://forums.phpfreaks.com/topic/200997-404-not-found-htaccess/#findComment-1055683 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.