Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

redirect redhat home page to another link

Posted on 2011-10-26
6
Medium Priority
?
277 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:uknet80
  • 3
  • 3
6 Comments
 
LVL 19

Accepted Solution

by:
xterm earned 2000 total points
ID: 37031263
This should work - try it out, and let me know if it needs tweaking

RewriteEngine On
RewriteRule ^/(.*)     http://%{HTTP_HOST}:9195/$1 [R]

You can put it in the .htaccess file, or in the VirtualHost for that site.
0
 

Author Comment

by:uknet80
ID: 37036336
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?





0
 
LVL 19

Expert Comment

by:xterm
ID: 37036368
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)
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

Author Comment

by:uknet80
ID: 37037406
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
0
 
LVL 19

Expert Comment

by:xterm
ID: 37038013
Change the one for /var/www/error
0
 

Author Closing Comment

by:uknet80
ID: 37129506
thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question