LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-04-2007, 05:33 PM   #1
izghitu
Member
 
Registered: Oct 2005
Location: localhost.localdomain
Distribution: CentOS
Posts: 109

Rep: Reputation: 16
mod_rewrite question


Hi,

I am looking for a way to rewrite all the non-www URLs to www.domain.com globally for all domains in httpd.conf except subdomains.

For example if someone open http://domain.com it should redirect him to www.domain.com
If someone opens subdomain.domain.com it should not redirect him to www.subdomain.domain.com

Is it possible?

I do not want to add to each <VirtualHost> the rewrite rules but instead do this globally.

Thanks
 
  


Reply


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
mod_rewrite question creolophus Linux - Software 2 06-20-2007 03:39 PM
mod_rewrite rule question jmoschetti45 Linux - Software 0 03-19-2007 07:29 PM
simple mod_rewrite question dbc001 Linux - Server 0 10-22-2006 11:14 PM
Mod_rewrite question hct224 Linux - Newbie 5 02-23-2006 11:03 AM
Apache (mod_rewrite) question Wonko the Sane Linux - Software 1 06-15-2003 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:41 AM.

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