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
Post a Comment