michaellunsford Posted January 30, 2006 Share Posted January 30, 2006 The basic idea is to have any request going to a certain directory be parsed by PHP.So if the browser calls image.jpg. this works great:[code]RewriteRule ^/?([^/]*)\.jpg$ index.php?page=$1 [L,NS][/code]which returns "image.jpg" but the directory also has gif, png, pdf, html, php, and who knows what else. So, I tried removing the "\.jpg":[code]RewriteRule ^/?([^/]*)$ index.php?page=$1 [L,NS][/code]but this returns "index.php" -- where it got that is beyond me. I tweak it a bit[code]RewriteRule ^(.*)$ index.php?page=$1 [L,NS][/code]also returns "index.php" -- in fact, numerous variations of the above (which _should_ be a complete wildcard) also returns "index.php".I'm so confused. What's missing here? Link to comment https://forums.phpfreaks.com/topic/3287-mod-rewrite-everything/ Share on other sites More sharing options...
Koobi Posted February 14, 2006 Share Posted February 14, 2006 i'm not sure i understand...do you want any file, except for another PHP file to be rewritten to index.php? Link to comment https://forums.phpfreaks.com/topic/3287-mod-rewrite-everything/#findComment-11738 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.