apache rewrite is not working in directadmin

1.2k views Asked by At

I want to rewrite every path to an index.php

with this code:

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

but when I type an invalid address my page redirect to 404.shtml (I guess)

for examle when I type:

1: http://sitename.com/image/a.png (which is exist) _url_ is image/a.png

2: http://sitename.com/nofolder/a.png (which is not exist) _url_ is 404.shtml

how is that possible when I rewrite everything to an existed index.php, still I get 404?

0

There are 0 answers