php - Parent htaccess override subfolder htaccess -
i have zend aplication uses hatccess , redirects index.php, need use password protect folder in 1 of subfolder, when tried acess subfolder keep giving me 404 error.
here zend htaccess in public_html folder:
rewriteengine on rewriterule !\.(js|txt|ico|gif|gif|jpg|jpg|png|png|css|swf|pdf|xml|xml|eot|svg|ttf|woff)$ index.php setenv application_env "production"
here subfolder htaccess:
rewriteengine off authtype basic authname "*folder*" authuserfile "/home/*user*/.htpasswds/public_html/*folder*/passwd" require valid-user
i tried add rewriterule ^blog/ - [l]to public_html folder see in: overwrite rewrite-rule of htaccess in parent folder
but didnt work. weird if take password part of subfolder htaccess, "rewriteengine off" work , got list of files in folder.
obs: server apache 2.2.25, rewriteoptions inheritbefore not options
obs2: folder , user not on actual htaccess hide names.
obs3: im noob in server configurations :)
this works me. paste code in parent htacesss underneath rewriterule
rewriterule ^(blog)($|/) - [pt,l]
Comments
Post a Comment