homepage Welcome to WebmasterWorld Guest from 54.166.8.138
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
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




msg:1507249
 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




msg:1507250
 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