Forum Moderators: phranque

Message Too Old, No Replies

'RewriteEngine On' on Raq4 problem

         

tito

6:47 am on Aug 22, 2004 (gmt 0)

10+ Year Member



Hello,

I'm trying 'RewriteEngine On' on an .htacces into my Raq4 but I can't succeed.

I've checked the httpd.conf and
LoadModule rewrite_module modules/mod_rewrite.so
is there, uncommented.

I've also tried 'Options FollowSymLinks' into my .htaccess before 'RewriteEngine On' and also tried 'AuthType Basic', it doesn't work.

My hosting told me that there was a change they had to make in the access.conf and therefore something should be added into each .htaccess but they can't remember.
It was an odd Raq4 Cobalt issue of some sort back from year 2002.

Please, do you have any idea?
Thanks in advance

tito

RonPK

2:41 pm on Aug 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the setting for AllowOverride for that directory in httpd.conf (or in access.conf or in srm.conf)? IIRC it should be at least FileInfo. Or set it to All, to be on the safe side.

tito

7:33 pm on Aug 22, 2004 (gmt 0)

10+ Year Member



Hello RonPK,

I don't see AllowOverride mentioned anywhere on httpd.conf and srm.conf

Into access.conf is as follows:
....
# First, we configure the "default" to be a very #restrictive set of permissions.

<Directory />
Options None
AllowOverride AuthConfig Indexes Limit
AuthFailDelay 2000000
</Directory>
....

and

....
# This controls which options the .htaccess files in # directories can override. Can also be "All", or any # combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"

AllowOverride All
....

Please, I do have .htaccess 'RewriteEngine on' into subdir. which properly works, only the .htaccess in root domain doesn't work.

The .htaccess working into subdir. is as follows;

RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://domain.net/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.domain.net/.*$ [NC]
RewriteRule .*\.(ra¦rm¦ram)$ [domain.net...] [R,NC]

Thanks so much for your help
tito

RonPK

9:04 pm on Aug 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could it be that the two .htaccess files give conflicting instructions?

tito

9:28 pm on Aug 22, 2004 (gmt 0)

10+ Year Member



The .htaccess not working is placed into the root domain and it's an 'RewriteEngine On' + 'Order Deny,Allow'.
The 'Order Deny,Allow' works, the 'RewriteEngine On' is not working.

The other .htaccess is just an 'RewriteEngine On' for anti-leeching and it's located into a subdir.

Do you believe there could be a conflict? If so how it could be solved?

jdMorgan

10:37 pm on Aug 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think it *can* work in your root directory, because you have disallowed FileInfo in AllowOverride. Your "restrictive" AllowOverride is too restrictive. Try:

AllowOverride AuthConfig [b]FileInfo[/b] Indexes Limit

Jim

tito

10:47 pm on Aug 22, 2004 (gmt 0)

10+ Year Member



Hi Jim,

I think that 'AllowOverride AuthConfig Indexes Limit'
was settled due to a possible exploit in Raq4 they discovered back in year 2002, but I don't know nothing about it.
Anyway I'd like to try, so should I change it like this?

<Directory />
Options None
AllowOverride AuthConfig FileInfo Indexes Limit
AuthFailDelay 2000000
</Directory>

And after I have re-uploaded my access.conf, do I have to restart apache or what else?!?

Thanks so much
tito

RonPK

10:39 am on Aug 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On my RaQ4 box I have this in access.conf:

<Directory /> 
Options None
AllowOverride None
AuthFailDelay 2000000
</Directory>
<Directory /home/sites/>
Options Indexes FollowSymLinks Includes
AllowOverride All
</Directory>

(snipped irrelevant parts).

No probs with mod_rewrite whatsoever. I am the only user on that server, so I don't need to worry about folks doing funny things in .htaccess.

And yes, you need to restart Apache before changes in *.conf files take effect.

tito

9:32 pm on Aug 23, 2004 (gmt 0)

10+ Year Member



Thank you so much RonPK, I'll try that.