How to use the AcceptPathInfo directive to enable pathname information in URLs

When to utilize the AcceptPathInfo Apache directive in an.htaccess file is covered in this article. This setting is necessary for some software programs to operate properly.

Pathname information in URLs:

By default, trailing pathname information cannot be included in URLs. Take the URL http://www.example.com/page.html/pathinfo as an illustration. The Apache web server will produce a 404 Not Found error because pathinfo is trailing pathname information in this URL.

The Moodle course management system, for example, uses URLs with pathname information, which prevents it from working properly. The AcceptPathInfo directive is used to enable pathname information in URLs.

You should include the following line in your .htaccess file to enable pathname information in URLs:

AcceptPathInfo On

To disable pathname information in URLs, modify the appropriate line in your .htaccess file as follows:

AcceptPathInfo Off

 

Was this answer helpful?

Related Articles

'403 Forbidden' error message

Problem You get a "403 Forbidden" error notice when you try to access your site with a web...

How to disable entity tags (ETags)

This article will show you how to stop your website from sending entity tags (ETags) in HTTP...

How to install Apache Tomcat

Apache Tomcat is a well-known and dependable open-source Java web server. Tomcat is a Java HTTP...

How to troubleshoot CGI scripts

If your CGI (Common Gateway Interface) script isn't working, try the following troubleshooting...

How to use keep-alive connections to improve performance

This article explains how to use keep-alive connections to improve performance in Apache. How to...