Jump to content

Archived

This topic is now archived and is closed to further replies.

timmy01

mod_rewrite images + Search engines

Recommended Posts

hi!

Can i mod_rewrite and url of an image in a file?
example:

reall url:
http://www.domain.com/images/2/200608011.jpg

and with mod_rewrite it should look like this:
http://www.domain.com/images/myphoto/holiday.jpg

is this possible?
And can Search engines still crawl this?

Regards
Tim

Share this post


Link to post
Share on other sites
This would be better suited for the apache forum.

I am  sure  this is possible but I have never used mode rewrite for a specific file other than this one case.

This is what I use for a search script. Maybe you can use this?

[code]RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ search.php?terms=$1 [L][/code]

[code]domain.com/find -> domain.com/search.php?terms=find (if /find is not a directory)[/code]

here are some useful links for mode rewrite
[url=http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html]http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html[/url]

[url=http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/]http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/[/url]


Now as far as search engine crawling, I have no idea

Hope this helps,
Tom

Share this post


Link to post
Share on other sites
this is url  /opening a page...
and not what i am looking for.
i should be about images

the <img src""> tag!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.