You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Alexander Skwar <li...@email-server.info> on 2003/04/10 13:41:54 UTC
[users@httpd] RewriteCond: cannot compile regular expression
Hello!
I'm having a problem with Apache-1.3.26-1.1 (Debian Package) on Debian
Woody.
In my /etc/apache/httpd.conf, I've got thsi:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond ${lowercase:%{HTTP_HOST}} ^(www\.|)([^.]+)\.info.dyndns.tv$
</IfModule>
To be honest, I did not come up with this myself. It's from
http://faq.solutionscripts.com/docs/homefree/tips/subdomains.html
When I now try to start apache, I get this error:
RewriteCond: cannot compile regular expression
'^(www\.|)([^.]+)\.info.dyndns.tv$'
I also tryed escaping the all the dots (ie. info\.dyndns\.tv). Didn't
change anything.
What strikes me, is that I'm able to use this on a SuSE 7.2 server with
Apache 1.3.19.
Any ideas about what I might have done wrong? Or how I could further
debug this problem?
Thanks a lot,
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Uptime: 20 days 6 hours 20 minutes
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] RewriteCond: cannot compile regular expression
Posted by Alexander Skwar <li...@email-server.info>.
So sprach Andrea Rossignoli am 2003-04-10 um 14:13:14 +0200 :
> So you can use:
>
> RewriteCond %{HTTP_HOST} ^((www\.)?([^\.]+\.))?info\.dyndns\.tv$ [NC]
Indeed, this works! Thanks a lot!
Any idea about why this has changed since 1.3.19?
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Uptime: 20 days 7 hours 30 minutes
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] RewriteCond: cannot compile regular expression
Posted by Andrea Rossignoli <so...@polin.it>.
Hi,
the problem is on the *|* of *(www\.|)*
It must be removed from there.
Another thing to take in consideration is that you don't have to use the
"lowercase function" (using a rewritemap function that is the tolower) to
make a case insensitive compare of HTTP_HOST.
The NC was created for that purpose.
So you can use:
RewriteCond %{HTTP_HOST} ^((www\.)?([^\.]+\.))?info\.dyndns\.tv$ [NC]
so domains as:
www.info.dyndns.tv
info.dyndns.tv
subdomain.info.dyndns.tv
www.subdomain.info.dyndns.tv
will be matched.
The compare is case insensitive due to NC flag.
Hope It Helps,
:-) Andrea
----- Original Message -----
From: "Alexander Skwar" <li...@email-server.info>
To: "Apache Users Mailinglist" <us...@httpd.apache.org>
Sent: Thursday, April 10, 2003 13:41
Subject: [users@httpd] RewriteCond: cannot compile regular expression
> Hello!
>
> I'm having a problem with Apache-1.3.26-1.1 (Debian Package) on Debian
> Woody.
>
> In my /etc/apache/httpd.conf, I've got thsi:
>
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteCond ${lowercase:%{HTTP_HOST}}
^(www\.|)([^.]+)\.info.dyndns.tv$
> </IfModule>
>
> To be honest, I did not come up with this myself. It's from
> http://faq.solutionscripts.com/docs/homefree/tips/subdomains.html
>
> When I now try to start apache, I get this error:
>
> RewriteCond: cannot compile regular expression
> '^(www\.|)([^.]+)\.info.dyndns.tv$'
>
> I also tryed escaping the all the dots (ie. info\.dyndns\.tv). Didn't
> change anything.
>
> What strikes me, is that I'm able to use this on a SuSE 7.2 server with
> Apache 1.3.19.
>
> Any ideas about what I might have done wrong? Or how I could further
> debug this problem?
>
> Thanks a lot,
>
> Alexander Skwar
> --
> How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
> Uptime: 20 days 6 hours 20 minutes
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org