Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-25-2009, 06:18 AM   #1
LQ Newbie
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19

Rep: Reputation: 0
National domains redirect

Hi guys,

I'm hosting some domains on my dedicated server. I'm using Apache to host web sites. One of my costumers asked me to host different national domains and a dot com. He wants to use this kind of redirect pattern: -> ->, =>

I guess I have to use the apache rewrite engine... I tried and it works but I would like to implement something elegant and not a dozen of different VirtualHost's directives with the relative rewrite rule.

Any idea?
Old 04-13-2009, 06:55 PM   #2
LQ Newbie
Registered: Nov 2002
Location: Iceland
Distribution: RHEL, CentOS, Slackware
Posts: 26

Rep: Reputation: 15
An idea

Wouldn't ServerAlias directives in the base VirtualHost suffice? That is, rather than having "a dozen of different VirtualHost's directives", you'd simply add something along the lines of:
to your <VirtualHost> section. Furthermore, you could put your RewriteRules in .htaccess.


apache, domains, locale

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
Multiple domains in LDAP and 1 samba server for all domains, what to do? xnomad Linux - Server 1 11-14-2008 09:12 AM
National Do Not Call Registry Dragineez General 1 09-21-2007 11:38 AM
Sub Domains & Multiple Domains (Apache) lugos Linux - Server 1 09-01-2006 10:22 PM
your national flag acid_kewpie General 27 05-19-2006 11:48 AM
National character and UTF-8 pingu Linux - Software 3 04-20-2005 01:58 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:09 AM.

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