php - I have two identical .htaccess. How do I create one in root folder? -


here .htaccess in root. same 1 in folder /enter

rewriteengine on  rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f  rewriterule ^([a-za-z0-9_-]+)$ index.php?content=$1 rewriterule ^([a-za-z0-9_-]+)/([a-za-z0-9_-]+)$ index.php?lang=$1&content=$2 

how turn on folder "enter" in root .htaccess , remove duplicate htaccess ?

i think you're looking this:

rewriteengine on  rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f  ## enter rewriterule ^([a-za-z0-9_-]+)/enter$ enter/index.php?lang=$1&content=$2 [l] rewriterule ^([a-za-z0-9_-]+)/enter/([a-za-z0-9_-]+)$ enter/index.php?lang=$1&content=$2 [l]  ## root rewriterule ^([a-za-z0-9_-]+)$ index.php?content=$1 rewriterule ^([a-za-z0-9_-]+)/([a-za-z0-9_-]+)$ index.php?lang=$1&content=$2 

by way: [l] means "last": http://httpd.apache.org/docs/2.4/rewrite/flags.html


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -