Forum Moderators: phranque

Message Too Old, No Replies

mod_alias help

         

stenew

9:48 pm on Apr 11, 2006 (gmt 0)

10+ Year Member



I need to redirect from the DocumentRoot to a subdirectory. I have tried creating an .htaccess file in the document root, but it doesn't seem to do anything.

What I want to do is as follows:

redirect ALL requests for [mydomain.com...] to [mydomain.com...]

I have created the following .htaccess file and placed it in my DocumentRoot.

RedirectPermanent ./ ./subdirectory

The problem is, the .htaccess file doesn't seem to get processed. Any suggestions?

Thanks,

Steve

jdMorgan

12:08 am on Apr 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your syntax isn't correct, but how about a simple test first...

RedirectPermanent / http://www.google.com/

Request "/" from your site, and you should get the Google homepage. That will determine whether you can use .htaccess and mod_alias.

Jim

stenew

12:14 am on Apr 12, 2006 (gmt 0)

10+ Year Member



Nope. Doesn't look like it is accessing the .htaccess. I tried redirecting to Google with no luck.

Any pointers? I thought I had apache configured properly. It looks like it is loading mod_alias in the config file.

Steve

jdMorgan

12:42 am on Apr 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have a look at AllowOverride [httpd.apache.org]. You'll need FileInfo at least, as specified in the Redirect documentation.

Jim