Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-17-2010, 06:55 AM   #1
Registered: May 2009
Location: chennai
Posts: 247

Rep: Reputation: 16
Redirect Method in Apache

Hai friends

How to redirect one website to another website in apache.
for example
when i type in my browser then it redirect to so how i do in apache , please advise me.

i am using centos 5.\

Old 04-17-2010, 07:16 AM   #2
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
.htaccess (or httpd.conf <Directory ..></Directory>)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^(.*)$$1 [R=301,L]
for / only:
RewriteEngine On
RewriteRule   ^/$ [P]

Last edited by troop; 04-17-2010 at 07:20 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect https apache requests to folder not in apache root bax Linux - Enterprise 4 04-12-2010 02:16 PM
apache - stage Get method noir911 Linux - Server 1 01-01-2008 04:59 AM
redirect http request to https with "post method" FMH Linux - General 0 10-01-2007 03:16 AM
redirect in Apache baslemmens Linux - Networking 6 09-02-2004 01:07 PM
Apache: Method Not Allowed Gerardoj Linux - General 2 03-21-2004 05:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration