Question

I am wanting to add a redirect to my bluehost shared ssl page: https://secure.bluehost.com/~user/page_to_redirect

to here: http://mydomain.com/folder/new_page

I need this setup, as I am using a website's API, which requires that the callback url is ssl. And i need this redirected to my ruby on rails app.

i have configured my .htacccess (root) like so:

    Options -Indexes
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.mydomain.\.com$
    RewriteRule ^/?$ "http\:\/\/mydomain\.com\/" [R=301,L]

    Redirect /page_to_redirect http://mydomain.com/folder/new_page

the redirect works for the non ssl page: mydomain.com/page_to_redirect but not the ssl page: https://secure.bluehost.com/~user/page_to_redirect

I just get a 404 error.

does anyone have any experience with this? Bluehost support was not very helpful at all.

this is what worked:

    Options -Indexes
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.mydomain.\.com$
    RewriteRule ^/?$ "http\:\/\/mydomain\.com\/" [R=301,L]

    Redirect 301 /~mydomain/page_to_redirect http://mydomain.com/folder/new_page

Was it helpful?

Solution

This is what worked:

Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.mydomain.\.com$
RewriteRule ^/?$ "http\:\/\/mydomain\.com\/" [R=301,L]

Redirect 301 /~mydomain/page_to_redirect http://mydomain.com/folder/new_page
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top