Jump to content

Excluding A File


broomsy

Recommended Posts

My .htaccess file currently reads like this:

[code]RewriteEngine on
RewriteRule ^(.*)\.html index.php?$1[/code]

So basically my index.php?blah would turn into blah.html.

My question is if I actually put a file up like test.html it actually goes to my index.html. How can I make real html files appear in the browser? Can I just exclude the file? I only need to validate Yahoo Site Explorer.

Also as your all so helpful can anyone explain my rewrite rule. I managed to put it together but didnt really understand it :)
Link to comment
https://forums.phpfreaks.com/topic/25153-excluding-a-file/
Share on other sites

Its to do with your rewriteRule. Its too "hungry"

So what ever you put after your domain name, say you do http://mysite.com/somefile.somecrap mod_rewrite will kick in and go to index.php?somefile.somecrap

You need to use a better regular expression.

What URL parameters does index.php take?
Link to comment
https://forums.phpfreaks.com/topic/25153-excluding-a-file/#findComment-114946
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.