homepage Welcome to WebmasterWorld Guest from 50.16.112.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Need felp with simple rule
girish

10+ Year Member



 
Msg#: 5184 posted 2:25 pm on Dec 24, 2005 (gmt 0)

Here is the url for an image
http://111.111.111.111/images/title.withbottom.gif

What is the rule to redirect the above url to
http://www.mysite/images/title.withbottom.gif

[edited by: jdMorgan at 4:35 pm (utc) on Dec. 24, 2005]
[edit reason] De-linked. [/edit]

 

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 5184 posted 4:35 pm on Dec 24, 2005 (gmt 0)

To answer your question specifically,

RewriteCond %{HTTP_HOST} ^111\.111\.111\.111
RewriteRule ^images/title\.withbottom\.gif$ http://www.mysite/images/title.withbottom.gif [R=301,L]

but you might consider a domain-wide redirect to help prevent anyone ever linking to your images by IP address or non-www domain, and to correct the requests if they do. That would make specific rules like this unnecessary.

Jim

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved