php - remove 3 directories in url via htaccess file -
i want convert url http://localhost/project1/mvc/public/content/1 url http://localhost/content/1.
i have .htaccess file placed in public folder removes index.php in url.
options -multiviews rewriteengine on rewritebase /project1/mvc/public rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.+)$ index.php?url=$1 [qsa,l]
here's directory structure:
project 1 ---mvc -----app -----public
i need in creating .htaccess file this. syntax modifying url , folder/s should put .htaccess file/s?
thanks
you can use code in document_root/.htaccess
file (above directory level of mvc
):
rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewriterule ^((?!/project1/mvc/public/).*) project1/mvc/public/$1 [l,nc]
Comments
Post a Comment