Help - Search - Members - Calendar
Full Version: Mod RewriteRule syntax error
The Planet Forums > Control Panels > cPanel/WHM
mickalo
Hello,

I am trying to add a RewriteRule for one our accounts and get this sytnax error message:
CODE
Syntax error on line 2232 of /usr/local/apache/conf/httpd.conf:

RewriteCond: bad flag delimiters



# This is line 2232 in the httpd.conf:

RewriteCond %{HTTP_HOST}  ^(www.)?([^.]+ .mydomain.com


what is the syntax error as I can't seem to find what causing it :confused:

this is the entire RewriteRule being used in the directive:
CODE
Rewritelog /home/<username>/tmp/rewrite.log

RewritelogLevel 0

RewriteEngine on

RewriteCond %{HTTP_HOST}    !^www.mydomain.com

RewriteCond %{HTTP_HOST}    ^(www.)?([^.]+ .mydomain.com

RewriteRule (.*) /cgi-bin/index.cgi/%2$1 [L]

TIA
Mickalo
smoker
QUOTE
Originally posted by mickalo
Hello,

I am trying to add a RewriteRule for one our accounts and get this sytnax error message:
CODE
Syntax error on line 2232 of /usr/local/apache/conf/httpd.conf:

RewriteCond: bad flag delimiters



# This is line 2232 in the httpd.conf:

RewriteCond %{HTTP_HOST}  ^(www.)?([^.]+ .mydomain.com


what is the syntax error as I can't seem to find what causing it :confused:  



Have you tried removing the extra period before mydomain.com ?
ie.:
CODE
RewriteCond %{HTTP_HOST}  ^(www.)?([^.]+ mydomain.com



and actually you haven't closed the ( ) brackets after the ?
alan
mickalo
QUOTE
Originally posted by smoker
Have you tried removing the extra period before mydomain.com ?
ie.:
CODE
RewriteCond %{HTTP_HOST}  ^(www.)?([^.]+ mydomain.com
 


and actually you haven't closed the ( ) brackets after the ?
alan

thx's smoker, that was the problem, which I noticed about 15mins after posting this... I missed the closing ) bracket! icon_razz.gif

thx's
Mickalo
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.