Forum Moderators: Robert Charlton & goodroi
The reason is a URL like index.php/my/directory/is/here/index.html would be a valid way to visit index.php
What are your current IgnorePathInfo settings? If your own htaccess doesn't contain this word, you're using the host's default. If they won't tell you, we can figure it out.
AddType application/x-httpd-php5 .htm .html The treatment of requests with trailing pathname information is determined by the handler responsible for the request. The core handler for normal files defaults to rejecting PATH_INFO requests. Handlers that serve scripts, such as cgi-script and isapi-handler, generally accept PATH_INFO by default.
Do you actually need the line? That is, do you have pages that are "really" php but their names end in .html? If your setup is like mine, you don't need the "AddType" line if all you've got is html files with php includes.
Do not run out and remove the line! You will need more information.
RewriteCond %{PATH_INFO} .
RewriteRule ^((?:[^./]+/)*[^./]+\.(?:html?|php)) http://www.example.com/$1 [R=301,L] RewriteRule ^((?:[^./]+/)*[^./]+\.(?:html?|php))/ http://www.example.com/$1 [R=301,L] am afraid I dont understand this part
Now that you have plugged the hole, go back and see if you can figure out where those bogus URLs are coming from. Usually the first place you look is anything with relative links.