K
K
kamwork2014-12-16 20:58:48
htaccess
kamwork, 2014-12-16 20:58:48

Why is this .htaccess calling index.php three times?

Good afternoon.
I didn’t notice something before, but my htaccess calls the index 3 times, I tracked it by accident.
The code

RewriteEngine On

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

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
neolink, 2014-12-16
@neolink

because you have 2 links on the page to images/js/css (at worst favicon which is requested by the browser /favicon.ico) which do not exist as files

K
kamwork, 2014-12-17
@kamwork

I don't know why, but this option works well

AddDefaultCharset UTF-8 

Options -Indexes

ErrorDocument 401 /401.html 
ErrorDocument 403 /403.html 
ErrorDocument 404 /404.html 

php_flag magic_quotes_gpc Off 
php_flag magic_quotes_runtime Off 
php_flag register_globals Off 

RewriteEngine   on

RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d  

RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question