0
votes

I have a bit of problem, here my log:

1. strip per-dir prefix: C:/wamp/www/web.site/projects/test/ -> projects/test/
2. applying pattern '(.*)' to uri 'projects/test/'
3. RewriteCond: input='C:/wamp/www/web.site/projects/test/' pattern='!-f' => matched
4. RewriteCond: input='C:/wamp/www/web.site/projects/test//index.php' pattern='!-f' => not-matched
5. pass through C:/wamp/www/web.site/projects/test/
6. strip per-dir prefix: C:/wamp/www/web.site/projects/test/index.php -> projects/test/index.php
7. applying pattern '(.*)' to uri 'projects/test/index.php'
8. RewriteCond: input='C:/wamp/www/web.site/projects/test/index.php' pattern='!-f' => not-matched
9. pass through C:/wamp/www/web.site/projects/test/index.php

.

Question is, why wont it stop at Line 5? or why is line 9 not line 5 ? Is there a way to prevent this? Here the code i have in my .htaccess file.

.

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME}/index.php !-f
    RewriteRule (.*) index.php [NC,L]

.

Can some one help me out here? I wan't faster loading times. Thank you in advance.

1

1 Answers

0
votes

It seems that you've configured Apache to a simple thing: if there's a directory that is requested then try to serve "index.php" that is in this directory:

DirectoryIndex index.php

So here's what's happening: Apache rewrites everything fine, then sees it's a directory => it tries to server index.php. The behavior seems both normal and pretty common ;)