Chris on 17 Jun 2005 15:29:26 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Apache mod_rewrite question...


Hey all,

I set up a rewrite from HTTP to HTTPS in my httpd.conf but I would like to
now drop the www off of the URL using the rewrite as well. So my question is
rather basic. Right now I have this as my rule:

RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]

Can I simply change that to not include the SERVER_NAME variable and hard
code a domain name? So the rule would look something like this:

RewriteRule ^/(.*) https://%{sub.domain.dom}/$1 [L,R]


If so would that transfer any requests for www.sub.domain.dom to
sub.domain.dom when apache ran the rule?


Thanks for your help.


Chris

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug