Forum Moderators: phranque

Message Too Old, No Replies

1.3.6 RedirectMatch ignored?

         

smapdi636

5:31 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



Howdy all.

I'm having some problems with RedirectMatch and I'm not sure how to even troubleshoot at this point.

I run a virtual host on my "development environment" locally on Apache 2.0.44 (Win32) where everything is working fine.

I tried recreating the virtual host on Apache 1.3.6 (AIX) today and am having some problems related to RedirectMatch.

I'm attempting to redirect root reqeusts and basically the RedirectMatch seems to be 100% ignored.

Nothing (out of the usual) is showing up in the access or error logs.

hitting [x.y.z...] shows a "GET / HTTP/1.1" and the following is returned to the browser, "Forbidden
You don't have permission to access / on this server."

Error log shows, "Directory index forbidden by rule."

I've tried different combinations of full URLs, quoting and not quoting, etc. to no avail.

Here's the VH definition from httpd.conf:

<VirtualHost *>
# redirect root requests to web-object index.htm
RedirectMatch ^/$ /cgi-bin/dev/index.htm
DocumentRoot /usr/local/apache/htdocs/x.y.z
ServerName x.y.z
ErrorLog logs/x.y.z-error_log
CustomLog logs/x.y.z-access_log combined
DirectoryIndex index.htm index.html
ScriptAlias /cgi-bin/ "/usr/local/apache/htdocs/x.y.z/cgi-bin/"
<Directory "/usr/local/apache/htdocs/x.y.z">
Options FollowSymlinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Any ideas?

Thanks

gergoe

6:58 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



You could try

RedirectMatch ^/?$ http://hostname/cgi-bin/dev/index.htm

I'm not sure how Apache handles the substitution url at this point, but according to the manual, it should be a fully qualified url. The question mark (in the pattern) should not have much use in this case, but it is worth of a try.

smapdi636

7:05 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



Thanks for the reply.

Still totally ignored. :( Tried this example based on your suggestion:

RedirectMatch ^/?$ [microsoft.com...]

[x.y.z...] returns:

"GET / HTTP/1.1" 403 284 "-"

jdMorgan

9:00 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you may need to add

Options Indexes

to your existing options.

Jim

smapdi636

10:57 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



I'll try again, but I'm almost positive I tried this already and simply got just that - a directory index of the root folder instead of the redirect I specified. Will try again tomorrow.

Thanks