Jump to content

mod_rewrite images + Search engines


timmy01

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
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.