httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Day" <c...@atpco.com>
Subject [users@httpd] Mod_rewrite rule help..
Date Tue, 03 Dec 2002 18:24:59 GMT
I'm having a lot of trouble trying to get apache to even recognize this
rule, which I'm sure I wrote wrong.

I want requests that look like:


http://calendar.domain.com/user1
http://calendar.domain.com/user2
http://calendar.domain.com/user3

which would be 404 documents, to redirect to

http://calendar.domain.com/view.php?ID=user1
http://calendar.domain.com/view.php?ID=user2
http://calendar.domain.com/view.php?ID=user3

so I could pull up that user's calendar and display it.

The rule I had been fiddling with was:

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

I'm sure I screwed it up though.. nothing is appearing in the rewrite log
(and I have that defined earlier in the conf) .. can anyone help me out with
this?

Thanks,
Chad


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