You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Júlio Maranhão <ju...@ieav.cta.br> on 2006/10/27 20:11:13 UTC

[users@httpd] Problem with mod_rewrite example from Apache manual

The following code was put in a working Apache httpd.conf;

RewriteEngine On
RewriteCond %{TIME_HOUR} > 20 [OR]
RewriteCond %{TIME_HOUR} < 07
RewriteRule ^/fridge - [F]

Now, "httpd.exe -t" reports the following syntax error:

Syntax error on line 392 of .../httpd.conf:
RewriteCond: bad flag delimiters

I commented the 2 RewriteCond lines and it worked again.
What is going on, since this is an example (copy/paste) from the manual? Is 
the error mine? Or is it a real bug (manual or code)?

Cheers,

Júlio

P.S.: Apache 2.2.3 running on Windows 2003 and compiled by the guys from 
ApacheLounge. The rewrite code was put at the main level, outside any Apache 
container. It's between the main site config and a virtual host config (ssl).


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


[users@httpd] Re: Problem with mod_rewrite example from Apache manual

Posted by Júlio Maranhão <ju...@ieav.cta.br>.
Joshua Slive wrote:
> 
> Please do file a bug report including that URL.
> 

Done.


---------------------------------------------------------------------
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] Re: Problem with mod_rewrite example from Apache manual

Posted by Joshua Slive <jo...@slive.ca>.
On 10/31/06, Júlio Maranhão <ju...@ieav.cta.br> wrote:
> Joshua Slive wrote:
> >
> > What error?  It looks correct in the manual to me.
> >
>
> http://httpd.apache.org/docs/2.2/howto/access.html
>
> The error is clear and the solution is to remove a single space as you explained.

Yep, you're right.  I was looking in the mod_rewrite docs.

Please do file a bug report including that URL.

Joshua.

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


[users@httpd] Re: Problem with mod_rewrite example from Apache manual

Posted by Júlio Maranhão <ju...@ieav.cta.br>.
Joshua Slive wrote:
> 
> What error?  It looks correct in the manual to me.
> 

http://httpd.apache.org/docs/2.2/howto/access.html

The error is clear and the solution is to remove a single space as you explained.

Cheers

Júlio


---------------------------------------------------------------------
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] Re: Problem with mod_rewrite example from Apache manual

Posted by Joshua Slive <jo...@slive.ca>.
On 10/28/06, Júlio Maranhão <ju...@ieav.cta.br> wrote:
> Joshua Slive wrote:
> > No space allowed between the >/< and the number.
>
> Many Thanks. I will report the manual error to the Apache guys.

What error?  It looks correct in the manual to me.

Joshua.

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


[users@httpd] Re: Problem with mod_rewrite example from Apache manual

Posted by Júlio Maranhão <ju...@ieav.cta.br>.
Joshua Slive wrote:
> No space allowed between the >/< and the number.

Many Thanks. I will report the manual error to the Apache guys.

Júlio


---------------------------------------------------------------------
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] Problem with mod_rewrite example from Apache manual

Posted by Joshua Slive <jo...@slive.ca>.
On 10/27/06, Júlio Maranhão <ju...@ieav.cta.br> wrote:
> The following code was put in a working Apache httpd.conf;
>
> RewriteEngine On
> RewriteCond %{TIME_HOUR} > 20 [OR]
> RewriteCond %{TIME_HOUR} < 07

No space allowed between the >/< and the number.

Joshua.

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