Jump to content


Photo

Rewrite problem...


  • Please log in to reply
1 reply to this topic

#1 dev99

dev99
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 April 2006 - 01:00 AM

RewriteMap lowercase int:tolower
RewriteEngine on

RewriteCond ${lowercase:%{HTTP_HOST}} !^$
RewriteCond ${lowercase:%{HTTP_HOST}} !^www\.hf-online.com$

RewriteCond ${lowercase:%{HTTP_HOST}} ^(www\.|)([^.]+)\.hf-online\.com$
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule ^(www\.|)([^.]+)\.hf-online\.com(.*) /users/$2$3 [L]

RewriteCond ${lowercase:%{HTTP_HOST}} ^(www\.|)[^.]+\.[^.]+\.hf-online\.com$
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule ^(www\.|)([^.]+)\.([^.]+)\.hf-online\.com(.*) /users/$3/$2$4 [L]

Code above works fine with apache 2.20
but with apache 1.3 apache won't start error:

Syntax error on line 1082 of /etc/apache/httpd.conf:
RewriteCond: cannot compile regular expression
'^(www\.|)([^.]+)\.hf-online\.com$'

#2 dev99

dev99
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 16 April 2006 - 12:47 PM

ok found my answer just had to change the ^(www\.|) to ^(www\.|)?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users