By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

rewriterule + image name

P: n/a
I need to rename a generic image to the name of the product that's
being viewed on the page:

/theme/images/fullProfile.gif to - /theme/images/
productxxx.jpg

The productxxx.jpg image doesn't physically exist so I just need to
rename the generic one and still display the same image under
different name.

Thanks,
Jack
Dec 6 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
JackpipE wrote:
I need to rename a generic image to the name of the product that's
being viewed on the page:

/theme/images/fullProfile.gif to - /theme/images/
productxxx.jpg

The productxxx.jpg image doesn't physically exist so I just need to
rename the generic one and still display the same image under
different name.

Thanks,
Jack
Hi Jack,

I don't get it.
If the file doesn't exist, what is it excactly that you want to do?

If you need to rename a file: use rename:
http://nl3.php.net/manual/en/function.rename.php

Regards,
Erwin Moller
Dec 6 '07 #2

P: n/a
On Thu, 06 Dec 2007 18:10:07 +0100, JackpipE <pi*******@gmail.comwrote:
I need to rename a generic image to the name of the product that's
being viewed on the page:

/theme/images/fullProfile.gif to - /theme/images/
productxxx.jpg

The productxxx.jpg image doesn't physically exist so I just need to
rename the generic one and still display the same image under
different name.
It think you mean the reverse?
If a request for /theme/images/productxxx.jpg comes in, and doesn't exist,
serve fullProfile.gif?

Highly offtopic here, ask in for instance alt.apache.configuration (or one
of the many forums almost dedicated to mod_rewrite), or look at the manual
for RewriteCond and the -f switch.
--
Rik Wasmus
Dec 6 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.