Link to home
Start Free TrialLog in
Avatar of uknet80
uknet80

asked on

redirect redhat home page to another link

Hello Experts,

I am not so familiar with Apache.  How to redirect Apache home page to another URL link under same server like (http://127.0.0.1:9195).  I did some search it recommed using (mod_rewrite), but don't know how to use it.

thanks
ASKER CERTIFIED SOLUTION
Avatar of xterm
xterm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of uknet80
uknet80

ASKER

I have located it at the end of httpd.conf file, and it worked thanks.  by default .htaccess doesn't exist, can you tell me where to created that file under /var/www/. and how its basic structure will be?





For a .htaccess file it literally needs nothing other than the rule itself, and you put the file in the DocumentRoot of the vhost which will make it recurse for all directories below it.

The only thing you need to remember about that is that for the directory you put it in, you need to tell Apache to honor .htaccess in that folder using AllowOverride in the Directory definition.  You can use All, or to narrow it down, FileInfo should work too (in your AllowOverride directive)
Avatar of uknet80

ASKER

DocumentRoot is located under /var/www/error/, I moved the file .htaccess to that folder.
There are several AllowOverride under httpd.conf file, which one shall i change to All? most of them are none
Change the one for /var/www/error
Avatar of uknet80

ASKER

thanks