The Little Guy Posted August 22, 2008 Share Posted August 22, 2008 How can I rewright this: http://mysite.com/process/build/newTempImg.php?url=http://tzfiles.com/images/logo.gif To this: http://mysite.com/process/build/url/http://tzfiles.com/images/logo.gif Quote Link to comment Share on other sites More sharing options...
corbin Posted August 22, 2008 Share Posted August 22, 2008 Easiest way would just be: RewriteEngine On RewriteRule url/(.*) newTempImg.php?url=$1 That would of course cause problems though if someone tried to tamper with the URL. Simple example. How specific do you want it? Do you want to make sure it's a valid URL in PHP or during the rewriting? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted August 23, 2008 Author Share Posted August 23, 2008 It MUST have a jpg, gif, or png, extention My php checks to see if it is an image, if not, nothing will happen. Quote Link to comment Share on other sites More sharing options...
corbin Posted August 23, 2008 Share Posted August 23, 2008 RewriteEngine On RewriteRule url/(.*)\.(jpg|gif|png) newTempImg.php?url=$1\.$2 Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted August 24, 2008 Author Share Posted August 24, 2008 Thanks! works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.