Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

http://www/

Status
Not open for further replies.

xmtb26

Programmer
Sep 12, 2007
19
GB
Background: we have 2 departments: Systems and Web. The Systems Dept controls software on servers and clients, and the Web Dept controls the Apache configuration as well as web development.

The Systems Dept has it set up so displays our company's homepage. We, the Web Dept, would like to see if we could use Apache to redirect to a fully qualified URL, e.g.,
Using the PermanentRedirect or Redirect directive like
Redirect / simply causes the server to go into an infinite loop of redirecting.

Don't get hung up on the politics, but is there a way Apache can determine if it was entered using or and if redirect to
 
Thank you lgarner.

I cannot seem to catch but only That is, isn't redirecting to However, will redirect to
I have tried both of these variations

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www$ [NC,OR]
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$ [R=301]

--OR--

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www$ [NC]
RewriteRule ^(.*)$ [R=301]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top