WordPress.org

Ready to get started?Download WordPress

Forums

How to create .hta file to redirect from my website URL to my blog URL? (8 posts)

  1. elucia
    Member
    Posted 5 years ago #

    HI there,

    My website is at: http://www.e-girlfriday.com

    My blog is here: http://www.e-girlfriday.com/blog

    I would like to set up a .htaccess file so that when users type in my WEBSITE URL, they will be directed to my BLOG URL.

    My ISP provides the code for the .htaccess file, but does not tell me what I need to know, which is:

    1. HOW do I set up that file?
    2. WHERE do I place it on my server/directory?

    Right now, my BLOG folder lives at the top level of my WEBSITE directory.

    Any help would be greatly appreciated!!

    thanks!!!

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    1. HOW do I set up that file?
    2. WHERE do I place it on my server/directory?

    1. Create a new text file, put the code into it, upload it to your site using FTP, then rename it on the site to .htaccess (you can't make an .htaccess file on a Windows machine easily).
    2. In the root website directory. Same as where the /blog directory is.

  3. elucia
    Member
    Posted 5 years ago #

    OH, thank you! I am on a Mac, however...does that matter??

    Your instructions seem too easy!!!

    :)

  4. elucia
    Member
    Posted 5 years ago #

    Hmmm....that didn't seem to work.

    I created a text file, and saved it as:

    htaccess.txt

    the code is: Redirect http://www.e-girlfriday.com/ http://www.e-girlfriday.com/blog

    didn't work

    what am I doing wrong??

    thanks for your help!!

  5. iridiax
    Member
    Posted 5 years ago #

    You could try this setup instead:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    I created a text file, and saved it as:

    htaccess.txt

    It must be named .htaccess and it will be invisible on your Mac, so rename it after it's uploaded if your ftp program can't see it.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    You need to rename it after you upload it. It MUST be named ".htaccess".

  7. After you rename the file to .htaccess, if it still doesn't work try this:

    Redirect / http://www.e-girlfriday.com/blog

  8. elucia
    Member
    Posted 5 years ago #

    SUCCESS!!

    1. the code was incorrect. I called my ISP and they provided the correct code, which was:

    Redirect 301 /index.html http://www.e-girlfriday.com/blog

    that worked!

    thanks so much everyone!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.