Forum Moderators: phranque

Message Too Old, No Replies

The .htaccess file does not get parsed/loaded

.htaccess file does not get parsed

         

Tynnhammar

10:11 am on Dec 29, 2007 (gmt 0)

10+ Year Member



Greetings.

I have a .htaccess in my document root, but it does not get parsed/loaded. I've tried with real syntax that I know should work (mod_rewrite code). I also tried putting random gibberish in there,(apache should make some error report due to that, righto?)

Any ideas what it might be? And what kind of information do you need?

jdMorgan

7:34 pm on Dec 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This indicates that AllowOverride [httpd.apache.org] is not set up to allow .htaccess files to override the server configuration specified in httpd.conf. This setting may be available in your control panel (if you have one). Otherwise, contact your hosting company and ask if they will change the setting for you.

Jim

g1smd

10:47 pm on Dec 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The last time I saw this, the server wasn't running Apache.

It was a Windows/IIS box, but the webmaster didn't realise that.

thinkdj

9:55 am on Dec 30, 2007 (gmt 0)

10+ Year Member



Make sure
AccessFileName .htaccess
is not commented (#) in httpd.conf

Also, Add AllowOverride All into the directory you want .htaccess to be read. E.g:

<Directory “/www/vhosts/localhost”>
...
AllowOverride All #Add this
</Directory>

Tynnhammar

10:29 am on Dec 30, 2007 (gmt 0)

10+ Year Member



It's on a local development server.

My .htaccess looks like this atm:

RewriteEngine On
RewriteRule registrering$ /user.php?action=add

The only relevant parts I could find in my apache2.conf is:

AccessFileName .htaccess

AllowOverride was nowhere to be found in the apache2.conf file.

My vhost file, (sites-enabled/sitename), looks kind of like this:

DocumentRoot /var/www
<Directory />
Options FollowSymlinks
AllowOverride All
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
allow from all
</Directory>

Tynnhammar

10:12 am on Jan 2, 2008 (gmt 0)

10+ Year Member



Bump =).

jdMorgan

3:26 pm on Jan 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have a specific question in mind about the code in your last post?

Tynnhammar

9:30 am on Jan 3, 2008 (gmt 0)

10+ Year Member



I'm sorry.. What I mean is, that it still does not work, and I'd like to know if the config settings above are OK?

phranque

1:46 pm on Jan 3, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



where is your .htaccess file?

Tynnhammar

4:13 pm on Jan 3, 2008 (gmt 0)

10+ Year Member



My .htaccess is located directly in /var/www/.

Tynnhammar

6:32 pm on Jan 6, 2008 (gmt 0)

10+ Year Member



Bump =).

Tynnhammar

9:11 am on Jan 7, 2008 (gmt 0)

10+ Year Member



I tried moving my mod_rewrite code into the vhost conf file, but the urls doesn't get rewritten. I've tried turning (rewrite)logging on, but nothing gets logged.

g1smd

10:41 pm on Jan 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



URL paths start with a slash for httpd.conf but the leading slash is suppressed for .htaccess rules.

You'll need to alter some of your rules to cater for that.