Root Folder Structure
Root .htaccess
Options -Indexes
Options +FollowSymLinks
Options +ExecCGI
AddHandler cgi-script .cgi .pl .py
RewriteEngine on
RewriteRule ^(.*)$ public/$1 [BCTLS]
php_value file_uploads 1
php_value memory_limit 1024M
php_value post_max_size 1024M
php_value upload_max_filesize 1024M
Inside "public" folder
.htaccess in public folder
Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !=/robots.txt
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ ?q=$1 [QSA,L]
My Problem
I cannot access the file p 1.jpg
like:
http://example.local/p%201.jpg
but it works if I change as follows
http://example.local/public/p%201.jpg
Also if a p.jpg
is there, I can access
http://example.local/p.jpg
- without any issue.