Redirect Using htaccess

Posted by manyxcxi on Server Fault See other posts from Server Fault or by manyxcxi
Published on 2010-06-09T17:30:10Z Indexed on 2010/06/09 18:53 UTC
Read the original article Hit count: 320

I am trying to redirect /folder to / using .htaccess but all am I getting is the Apache HTTP Server Test Page. My root directory looks like this:

/
.htaccess
-/folder
-/folder2
-/folder3

My .htaccess looks like this:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/folder/
RewriteRule (.*) /folder/$1 

What am I doing wrong? I checked my httpd.conf (I'm running Centos) and the mod_rewrite library is being loaded. As a side note, my server is not a www server, it's simply a virtual machine so it's hostname is centosvm.

© Server Fault or respective owner

Redirect Using htaccess

Posted by manyxcxi on Stack Overflow See other posts from Stack Overflow or by manyxcxi
Published on 2010-06-09T18:51:32Z Indexed on 2010/06/09 19:02 UTC
Read the original article Hit count: 319

Filed under:
|
|
|

I am trying to redirect /folder to / using .htaccess but all am I getting is the Apache HTTP Server Test Page. My root directory looks like this:

/
.htaccess
-/folder
-/folder2
-/folder3

My .htaccess looks like this:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/folder/
RewriteRule ^(.*)$ folder/$1 [L]

What am I doing wrong? I checked my httpd.conf (I'm running Centos 5.3) and the mod_rewrite library is being loaded. As a side note, my server is not a www server, its simply a virtual machine so its hostname is centosvm.

Addition: I have found that the mod_rewrite module is loaded, but none of my .htaccess redirects seem to be working.

© Stack Overflow or respective owner

Related posts about apache

Related posts about centos