Jump to content

Rewrite problem...


dev99

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$'
Link to comment
https://forums.phpfreaks.com/topic/7365-rewrite-problem/
Share on other sites

Archived

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

×
×
  • Create New...

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.