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? Quote 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? Quote Link to comment https://forums.phpfreaks.com/topic/3287-mod-rewrite-everything/#findComment-11738 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.