php - Redirect to index in subfolder -
i have .htaccess file inside root/en
, when enter url root/en
want site redirect root/en/public/index.php
, find index there. have solution reason doesn't work:
rewriteengine on rewritebase /en rewritecond %{request_uri} !en/public/ rewriterule ^(.*)$ en/public/$1 [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule .* index.php?/$0 [pt,l]
if using front controller use:
rewriteengine on rewritebase /en/ rewriterule ^$ public/index.php [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^((?!public/).+)$ public/index.php/$1 [l,nc]
Comments
Post a Comment