httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Rossignoli" <softw...@polin.it>
Subject Re: [users@httpd] RewriteCond: cannot compile regular expression
Date Thu, 10 Apr 2003 12:13:14 GMT
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" <lists.ASkwar@email-server.info>
To: "Apache Users Mailinglist" <users@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


Mime
View raw message