logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Redirect help with .htaccess
Author
anika



Joined: 28 Aug 2010
Posts: 1

PostPosted: Sat 28 Aug '10 2:04    Post subject: Redirect help with .htaccess Reply with quote

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: 7373
Location: Germany, Next to Hamburg

PostPosted: Sun 29 Aug '10 17:13    Post subject: Reply with quote

Add this after RewriteEngine on
Code:

RewriteRule   ^index\.html       -                  [L]


than index.html won't be rewritten.
Back to top


Reply to topic   Topic: Redirect help with .htaccess View previous topic :: View next topic
Post new topic   Forum Index -> Apache