Anuj Kumar
Anuj Kumar

Reputation: 102

image is not loading , .htaccess file problem

Someone tell me, where i'm doing wrong . this is my .htaccess file code

Options -Indexes

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.*)/$ /$1 [R=301,L]
RewriteRule ^(.*)$ Core/index.php?app=$1 [QSA,L]

Here everything looks good. every request go to Core/index.php file. but when I type a URL to any file ( images, video ...) which is in current server, then file is not loading in browser. instead of file loading , it loads index.php page again (I found in Network panel of the browser)

Upvotes: 1

Views: 464

Answers (1)

RavinderSingh13
RavinderSingh13

Reputation: 133780

Could you please try following, based on your shown attempts. You should write rule of removing / at last before your other rule of rewriting.

Please make sure to clear your browser cache before testing your URLs.

Options -Indexes
RewriteEngine on

RewriteRule ^(.*)/$ /$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ Core/index.php?app=$1 [QSA,L]

Upvotes: 2

Related Questions