Hot answers tagged

2

You could try the following (mod_rewrite directives) in the .htaccess file in the document root: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+/)?(?:[^/]+)/([^/]+)$ $1$2 [L] If the requested file does not exist (!-f) then internally rewrite the request by removing the parent directory ((?:[^/]+)) from the URL. $1 is a backreference ...



Only top voted, non community-wiki answers of a minimum length are eligible