I already have htaccess redirection for all bad requests to custom/default 404 page:
ErrorDocument 404 /404.html
But still the site can be accessed like:
http://www.domain.com/index.html/http:/domain.com
It cause duplicate content issue and duplicate SEO tag issues. Any suggestions?
This additional URL-path starting with a slash that follows the end of a URL that maps to a physical file is called "additional pathname information" (accessible in JavaScript through the
Location.pathname
property, or in PHP through the$_SERVER['PATH_INFO']
superglobal). Unless explicitly stated, whether it is accepted or not (on the server) is controlled by the handler for the request. However, it can be explicitly enabled/disabled with theAcceptPathInfo
directive in your.htaccess
file:With it
Off
, then URLs that contain path-info will trigger a 404.See also: