Welcome Guest, Not a member yet? Register   Sign In
.htaccess file in apache server config
#1

[eluser]nzmike[/eluser]
I recently read an article that said using .htaccess is a slight performance hit as apache has to look in every directory it goes through for an .htaccess file. So I've been trying to get rid of all my .htaccess files but have found it's not as easy as copying and pasting the code in the config file.

Here's the contents of my current .htaccess file:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !index.php
    RewriteRule (.*)\.php$ index.php/$1
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
    ErrorDocument 404 index.php
</IfModule>

and this is the block I'm trying to paste it into in my default file in site-available in apache2.

Code:
<Directory /old>
                Order Deny,Allow
                Deny from all
                Allow from 192.168.1
                # trying to paste in here
        </Directory>

It works fine when I use the .htaccess file in the /old directory but as soon as I put the code in the config file it doesn't. Does anyone have any idea why this is?

Mike


Messages In This Thread
.htaccess file in apache server config - by El Forum - 08-31-2009, 04:10 AM
.htaccess file in apache server config - by El Forum - 09-01-2009, 05:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB