php - .htaccess rewrite in subdirectory not working under root directory with .htaccess -


my domain points root folder. in folder need have .htaccess redirect subfolder.

in root folder have .htaccess:

rewriteengine on rewritebase / rewritecond %{request_uri} !^/sub/folder/ rewritecond %{http_host} ^(www\.)?domain\. rewriterule ^(.*) /sub/folder/$1 [l] 

in sub/folder/.htaccess have lines:

rewriteengine on rewritebase /  errordocument 404 /index.php?action=404  rewritecond %{request_uri} ^/image/([^/]+)/(\d+)x(\d+)/([^/]+).(jpg|png)$ rewriterule (.*) file.php?action=%1&code=%4&w=%2&h=%3 [b,l,qsa]  rewritecond %{request_uri} ^/cscard_valid$ rewriterule (.*) index.php?action=cscardvalid&ajax=true [l,qsa] .. 

i don't known why redirects doesn't works. can me please? thanks

get rid of .htaccess in subfolder add rules root 1 so:

rewriterule ^image/([^/]+)/(\d+)x(\d+)/([^/]+).(jpg|png)$ sub/folder/file.php?action=$1&code=$4&w=$2&h=$3 [b,l,qsa] 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -