You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chad Day <cd...@atpco.com> on 2002/12/03 22:26:39 UTC

[users@httpd] RE: users Digest 3 Dec 2002 21:00:19 -0000 Issue 619

Thanks for the help, it's definetly using the rewrite rule now.

Unfortunately, it's doing it for everything in the domain, even
calendar.domain.com, not just 404 files.

It triggers the rule and just keeps looping back to view.php .. I tried
messing with the rule a bit:

(one of the things I tried)
RewriteLog /path/to/my/log
RewriteEngine on
RewriteCond %{REQUEST_URI}/?$ !-f
#RewriteCond %{REQUEST_URI} ^/([^/]+)/?$
RewriteRule (/.*) http://calendar.penguinleagues.com/view.php?ID=$1 [R,L]

but I can't seem to get it to go .. anyone else?  Thanks for the help!

Chad

On Tue, 3 Dec 2002, Chad Day wrote:
> RewriteEngine on
> RewriteCond %{REQUEST_URI} ^/([^/]+)/?$
> RewriteCond /usr/local/www/sites/domain.com/htdocs/calendar/$1 !-d [NC]
> RewriteRule /.* http://calendar.domain.com/view.php?ID=$1 [R,L]
> RewriteEngine Off

Hmmm... You're the second person I've seen using RewriteEngine On ...
RewriteEngine off.  Where are people getting that idea?  The RewriteEngine
off is overridding the rewriteEngine On and making apache ignore all the
rewriterules.  Get rid of it.

Also, if you want there to be anything in the $1, you'll need to replace
"/.*" with "/(.*)".

Finally, if you want something in the rewrite log file (good idea!),
you'll want a RewriteLog and RewriteLogLevel directive.

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


Re: [users@httpd] RE: users Digest 3 Dec 2002 21:00:19 -0000 Issue 619

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 3 Dec 2002, Chad Day wrote:
> It triggers the rule and just keeps looping back to view.php .. I tried
> messing with the rule a bit:
>
> (one of the things I tried)
> RewriteLog /path/to/my/log
> RewriteEngine on
> RewriteCond %{REQUEST_URI}/?$ !-f
> #RewriteCond %{REQUEST_URI} ^/([^/]+)/?$
> RewriteRule (/.*) http://calendar.penguinleagues.com/view.php?ID=$1 [R,L]
>
> but I can't seem to get it to go .. anyone else?  Thanks for the help!

What is the "/?" doing on the end of %{REQUEST_URI}?

You need to look in the RewriteLog (with RewriteLogLevel 9) to see what is
wrong beyond that.

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