O
O
onogur2014-03-31 16:44:33
PHP
onogur, 2014-03-31 16:44:33

Why does mod_rewrite prevent css images from loading?

Here is my .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

When you enter the site on the main page, everything is displayed normally in terms of pictures, but as soon as you go to another page, everything flies. Before adding RewriteCond lines, it was the same on the main page. What is the problem? By the way, everything works fine on Denwer, but not on Apache2 and Ubuntu 12.04.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander Zelenin, 2014-03-31
@zelenin

look at the path to the pictures on the inner page and write here.

K
Konstantin Velichko, 2014-03-31
@Zoxon

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

R
Ruslan, 2014-03-31
@rOOse

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

So maybe?

O
onogur, 2014-03-31
@onogur

It's all about RewriteCondB, because when you remove RewriteCond %{REQUEST_FILENAME} !-f, then pictures on the main index page also don't load!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question