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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_rewrite / RewriteCond question

Status
Not open for further replies.

vulcand4

Programmer
Jul 29, 2003
76
US
I'm trying to do a rewrite using:

RewriteCond %(HTTP_HOST) ="admin.host.com" [NC]
RewriteRule ^(.*)$ [R=permanent,L]

But the rewrite doesn't happen.

Is there a way to see what's actually in the %(HTTP_HOST) variable, so that I know whether it's the RewriteCond or the RewriteRule that's not being met?

- Greg
 
Try removing the "=". and changing the () to {}.

RewriteCond %{HTTP_HOST} "admin.host.com" [NC]
RewriteRule ^(.*)$ [R=permanent,L]

If you need to see if the pattern is matching turn logging on.

RewriteLog /tmp/rewrite.log
RewriteLevel 9


Michael


WarpZero Technologies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top