New answers tagged


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

Top 50 recent answers are included