1

I saw this: How to redirect root and only root via htaccess? and it's close, but not quite.

I am in the middle of rewriting a site, and would like to be able to send users from:

http://myfullurl.com

to:

http://mylandingpageurl.com

While retaining the ability to test the site at:

http://myfullurl.hostingprovider.com
Mike Fiedler
  • 2,152
  • 1
  • 17
  • 33

1 Answers1

2

Use mod_rewrite like this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^myfullurl\.com$ [NC]
RewriteRule ^(.*)$ http://mylandingpageurl.com/$1 [R=301,L]
fuero
  • 9,413
  • 1
  • 35
  • 40