httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Peelman" <npeel...@cfl.rr.com>
Subject Re: [users@httpd] Help with ReWrite...
Date Sun, 20 Jun 2004 01:42:18 GMT
----- Original Message ----- 
From: "Eugene Lee" <list-apache@fsck.net>
To: <users@httpd.apache.org>
Sent: Saturday, June 19, 2004 9:06 AM
Subject: Re: [users@httpd] Help with ReWrite...


> On Sat, Jun 19, 2004 at 08:45:23AM -0400, Norman Peelman wrote:
> :
> :  I would like to rewrite this:
> :
> : www.mydomain.com/number.jpg or .gif
> :
> : to
> :
> : www.mydomain.com/myphpscript.php?myvar=number
> :
> : ex.
> :
> : www.mydomain.com/100.gif  becomes
www.mydomain.com/myphpscript.php/myvar=100
>
> Something like this should do it (untested):
>
> RewriteEngine on
> RewriteRule ^/(\d+)\.(jpg|gif)$ /myphpscript.php?myvar=$1 [R]
>
>
> -- 
> Eugene Lee
>


Eugene,
   Thank you, that works perfectly so far. I may need to tweak it after I
start throwing crazy stuff at it to see what happens.  I was having other
problems besides that though. I had two problems, first, my config file
doesn't seem to like <IfModule>...</IfModule> tags and second I needed to
remove spaces in RewriteOptions MaxRedirects = 10.  All this on WinXP Pro
w/Apache2.0.45/PHP/MySQL.

Thanks, again.


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