.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

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

html - Outlook 2010 Anchor (url/address/link) -