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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -