How Do I Do a 301 Redirect From an HTML Page to a Top Level PHP Domain?

5 replies
  • WEB DESIGN
  • |
I want to go from example.com/example-page.html

and redirect it to

differentsite.com

I'm going from basic HTML on the first page to a WordPress run blog on the second page. All my .htaccess file says is:


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


Can someone clearly explain to me what I need to do to do a permanent 301 redirect from the first site to the other? I've never done a 301 before and haven't found a good explanation yet. Thanks so much!
#301 #domain #html #level #page #php #redirect #top
  • Profile picture of the author trentonlaura
    Sorry for the bump but I'm really stumped here.

    I looked at some websites talking about how to add the code to your htaccess file. I added the code following the END Wordpress code above, uploaded it, it didn't work. It may be a tricky situation/not typical situation because I'm going from an HTML subdomain to a PHP top level.
    {{ DiscussionBoard.errors[4267774].message }}
    • Profile picture of the author Jay_Selders
      Is the .htaccess you posted from example.com or differentsite.com?
      {{ DiscussionBoard.errors[4267825].message }}
  • Profile picture of the author trentonlaura
    It's for example.com
    {{ DiscussionBoard.errors[4268510].message }}
  • Profile picture of the author Jay_Selders
    Try adding this to the top of your .htaccess:

    Redirect 301 /example-page.html
    /new/http://www.differentsite.com/home
    {{ DiscussionBoard.errors[4268543].message }}
  • Profile picture of the author trentonlaura
    I tried doing as you said and got a 500 internal service error page. No idea why, I inputted the addresses correctly.
    {{ DiscussionBoard.errors[4269030].message }}

Trending Topics