.htaccess remove subdirectory from URL
I can't seem to figure this out, I have a directory structure in my root folder like '/state/page--city'. In my htaccess file i redirect all requests that are not directories or files in my root folder to a page.php. So what I would want is to remove the '/state' part from the URL when the users开发者_开发知识库 access 'http://example.com/state/page--city/' so that the URL looks like 'http://example.com/page--city/'. Any ideas? Thnx.
.htaccess file:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* page.php?&[|]v1||%{REQUEST_URI}[|]v2||-[|]v3||%{HTTP_HOST}[|]v4||%{REQUEST_FILENAME}[|]v5||EOL[~|~]= [QSA,L]
精彩评论