Reputation: 4085
I want to make a redirect (using .htaccess) to an external site that host where my app can be downloaded so I can give users a url to server.com/install
but when I add
Redirect 301 / http://google.com/
to my install directory it redirects to http://google.com/install
which is not what I want.
How can I accomplish this with htaccess?
Upvotes: 0
Views: 1285
Reputation: 4943
Redirect
automatically appends anything from the original URL to the new URL.
Give this a try:
Options FollowSymLinks
RewriteEngine On
RewriteRule ^/ http://google.com [L,R=301]
One more attempt, I added the RewriteBase and wildcard to match all. But I think the problem was that there was no trailing /
after google.com
. Maybe someone else will answer if this doesn't work.
Options FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ http://google.com/ [L,R=301]
Upvotes: 1