Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-18-2006, 01:29 AM   #1
Registered: May 2004
Posts: 63

Rep: Reputation: 15
Post Redirecting to

Ok the subject says it well enough. I have and want it so anytime that someone types it automagically redirects to, same for pages, such as should redirect to I have read a few posts on 301 redirects but can't seem to get it to work. I can do this on the httpd.conf level or in the .htaccess file for the domain, either works. Here is my current Virtual host enty for this domain:

<VirtualHost xx.xx.xx.xx>
DocumentRoot /home/domain/public_html
BytesLog domlogs/domain.con-bytes_log
ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/
DirectoryIndex index.php index.htm index.html index.cgi
User domain
Group domain
CustomLog /usr/local/apache/domlogs/ combined
My current .htaccess file is blank. Any help is appriciated.
Old 05-18-2006, 04:16 AM   #2
Registered: Apr 2006
Location: Delhi, India
Distribution: Fedore , CentOs, Debian
Posts: 121

Rep: Reputation: 15

Just a quick note, you can use
"redirect" directive, I am not sure if it handle Regular expression.

you can also do this programmatically from within your Scripts.
Old 05-18-2006, 04:28 AM   #3
Registered: May 2004
Posts: 63

Original Poster
Rep: Reputation: 15
I had tried a redirect but I wasn't working. I assume somehting was wrong with my code. My provider got it working and i'm waiting for the code he used so I can figure out what I did wrong. I'll post it here once I have it, so others can see for future ref.
Old 05-18-2006, 04:41 AM   #4
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,885

Rep: Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608
It should be something like:
ServerAlias *


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual host work, don't work stormrider_may Linux - Networking 4 05-03-2006 10:52 PM
Cant get entry in bind to work with instead of pxes351 Linux - Networking 12 05-09-2005 07:20 AM
Domain resolves with no www... ServerStorm Linux - Software 20 11-15-2004 11:12 AM instead of pyrombca Linux - Software 1 11-04-2004 03:36 PM
The WWW part in my domain msditech Linux - Newbie 0 12-09-2001 10:36 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:59 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