Jump to content

AcceptPathInfo


phpnew

Recommended Posts

Hi there,

 

I have a website on shared hosting where PHP is configured to run in CGI module. In order to have my PHP code working, I use this in .htaccess:

AddHandler application/x-httpd-php5 .html .htm

AddType x-mapp-php5 .html .htm

 

But that creates an environment that returns 200 OK on URLs with trailing slash and any string after that: Example:

 

Regular URL: example.com/page.html

URL with trailing slash: example.com/page.html/whatever

 

For the second one, it should return 404, but with PHP handler being used, it actually returns page.html with broken links which causes further creation of infinite number of pages with duplicate content.

 

Now about AcceptPathInfo.

 

If the server is configured as Apache module, the command AcceptPathInfo Off in .htaccess resolves this issue. But with the configuration as CGI module, it does not matter.

 

Why is this and is there a workaround?

 

Thanks

 

Link to comment
Share on other sites

  • 1 year later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.