Jump to content

Archived

This topic is now archived and is closed to further replies.

dev99

Rewrite problem...

Recommended Posts

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$'

Share this post


Link to post
Share on other sites
ok found my answer just had to change the ^(www\.|) to ^(www\.|)?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.