apache - HTAccess: Internal redirect directories (or symlink?) -
i'm struggelling following situation want solve htacess redirection.
- the main cms running in root directory /.
- in subdirectory /shop/.. there shop (based on system)
till fine: main website rewritten /.htaccess , shop /shop/.htaccess
now want access english version of shop /en/shop/.. calls should redirected shop-system in directory /shop (but url /en/shop/.. in browser)
i tried following:
rewriteengine on rewritecond %{request_uri} ^/en/shop/$ rewriterule ^(.*)$ /shop/$1 [l,qsa]
which not working.
my question is: can solve simple htaccess or more elegant solution make symlink /en/shop => /shop ? (are there performance differences between these solutions?)
thanks in advance
put following code @ root folder .htaccess
file :
rewriteengine on rewritebase / rewritecond %{the_request} !\s/+en/ [nc] rewriterule ^shop/ en%{request_uri} [r=302,l,ne] rewriterule ^en/(.*)$ $1 [l,nc]
Comments
Post a Comment