.htaccess - Httaccess rewrite rules with pictures -
here rewrite script (.htaccess)
options +followsymlinks rewriteengine on rewriterule ^(action|ajax|api|uploads)(.*)$ - [l] rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewriterule ^.*$ ./index.php
now have url: http://domain.tld/uploads/users/1/pictures/1443563069.jpg
the picture exist, can't load it. rewrite rule not ok?
try code in root .htaccess:
options +followsymlinks rewriteengine on rewritecond %{the_request} /(action|ajax|api|uploads) [nc] rewriterule ^ - [l] rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewriterule ^ index.php [l]
using %{the_request}
because request_uri
changes /index.php
in last rule.
Comments
Post a Comment