| 
 
 
 | 
| Keep Server Online 
 If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
 
 or
 
 
   
 A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
 
 Thank You! Steffen
 
 Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
 |  | 
 | 
| | 
| | 
|  Topic: Redirect help with .htaccess |  |  
| Author |  |  
| anika 
 
 
 Joined: 28 Aug 2010
 Posts: 1
 
 
 | 
|  Posted: Sat 28 Aug '10 2:04    Post subject: Redirect help with .htaccess |   |  
| 
 |  
| Hi, 
 I'm moving my old site to a new domain. In order to keep my SEO and inform my friends. I've create an index.html file with a redirect inside it using the meta tag.
 I also want whoever to reach oldsite/* to get redirect to the newsite.com/*
 
 I got the following in .htaccess which does the job of redirecting everything fine, but doens't show the index.html if the user hits oldsite.com:
 
 Options +FollowSymLinks
 RewriteEngine on
 RewriteRule (.*) http://www.newsite.com/$1 [R=301,L]
 
 However, I also want whoever to reach oldsite.com to be able to view the index.html file before being redirected. How can I do it ?
 
 Thank you in advance for your help,
 -anika
 |  |  
| Back to top |  |  
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Sun 29 Aug '10 17:13    Post subject: |   |  
| 
 |  
| Add this after RewriteEngine on 
  	  | Code: |  	  | RewriteRule   ^index\.html       -                  [L]
 
 | 
 
 than index.html won't be rewritten.
 |  |  
| Back to top |  |  
 
 | 
 |  | 
 |  |