How do I redirect my site using a .htaccess file? in simple way

This document will explain how to create a .htaccess file to redirect your site or site content. This will not redirect any emails for your domains.

As a configuration file, .htaccess is very powerful. Even the slightest syntax error (like a missing space) can result in your content not displaying correctly or at all.

Since .htaccess is a hidden system file, please make sure your FTP client is configured to show hidden files. This is usually an option in the program’s preferences/options.

Instructions

1. Create an empty text file using a text editor such as notepad, and save it as htaccess.txt.

NOTE:

The reason you should save the file as htaccess.txt is because many operating systems and FTP applications are unable to read or view .htaccess files by default. Once uploaded to the server you can rename the file to .htaccess.

2. Edit the contents of the file. Check the following examples:

301 (Permanent) Redirect: Point an entire site to a different URL on a permanent basis. This is the most common type of redirect and is useful in most situations. In this example, we are redirecting to the “mt-example.com” domain:

# This allows you to redirect your entire website to any other domain
Redirect 301 / http://mt-example.com/

302 (Temporary) Redirect: Point an entire site to a different temporary URL. This is useful for SEO purposes when you have a temporary landing page and plan to switch back to your main landing page at a later date:

# This allows you to redirect your entire website to any other domain
Redirect 302 / http://mt-example.com/

Redirect index.html to a specific subfolder:

# This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://example.com/newdirectory/

Redirect an old file to a new file path:

# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html

Redirect to a specific index page:

# Provide Specific Index Page (Set the default handler)
DirectoryIndex index.html

3. Upload this file and re-name it to .htaccess.

NOTE:

164 comments

  1. I’m impressed, I have to admit. Seldom do
    I encounter a blog that’s both equally educative and amusing, and without
    a doubt, you have hit the nail on the head.
    The issue is something which too few folks are speaking intelligently about.
    Now i’m very happy that I stumbled across this
    during my search for something relating to this.

  2. I all the time used to read piece of writing in news papers but now as
    I am a user of net so from now I am using net for articles
    or reviews, thanks to web.

  3. Thanks on your marvelous posting! I certainly enjoyed reading it, you will be a great author.I will make certain to bookmark your blog and will often come back later on. I
    want to encourage that you continue your great job, have a nice evening!

  4. Great beat ! I wish to apprentice while you amend your site, how could i subscribe
    for a weblog website? The account aided me a appropriate
    deal. I have been tiny bit familiar of this your broadcast provided bright transparent concept

  5. Hey there I am so happy I found your weblog, I really
    found you by mistake, while I was researching on Aol for something
    else, Anyhow I am here now and would just like to say many thanks
    for a incredible post and a all round entertaining blog (I also love the theme/design), I don’t have
    time to browse it all at the minute but I have bookmarked
    it and also added your RSS feeds, so when I have time I will be back
    to read a great deal more, Please do keep up the awesome job.

  6. Hi there this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding skills so I wanted to get advice from someone with experience.

    Any help would be enormously appreciated!

  7. Hello, i feel that i saw you visited my blog so i came to
    go back the favor?.I am attempting to in finding things to improve my web
    site!I suppose its ok to use a few of your concepts!!

  8. I simply want to say I’m very new to blogs and really loved your web-site. Probably I’m want to bookmark your site . You definitely have exceptional articles. Many thanks for sharing your website.

  9. I simply want to say I am beginner to blogs and certainly liked you’re web site. Most likely I’m want to bookmark your site . You certainly have remarkable writings. With thanks for revealing your website page.

  10. I’d like to thank you for the efforts you’ve put in writing
    this blog. I really hope to view the same high-grade blog posts by
    you later on as well. In fact, your creative writing abilities
    has inspired me to get my own website now 😉

  11. Hmm it seems like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I wrote and say,
    I’m thoroughly enjoying your blog. I as well am an aspiring blog writer
    but I’m still new to the whole thing. Do you have any recommendations for first-time blog writers?
    I’d certainly appreciate it.

  12. These ingredients could be blended with other natural homemade recipes to create a effective acne treating
    regiment that can be used every day. A high demand for acne remedies has
    resulted because of the large amount of afflicted people.
    Palo Alto Medical Foundation stated that washing see your face
    all the time can cause your pores to become infected thus causing more acne.

  13. Howdy would you mind letting me know which web host you’re working with?
    I’ve loaded your blog in 3 completely different web browsers and I must say this blog loads a lot faster then most.

    Can you recommend a good internet hosting provider at a reasonable price?
    Kudos, I appreciate it!

  14. Excellent beat ! I wish to apprentice while you amend your website, how can i subscribe
    for a blog web site? The account aided me a acceptable deal.
    I had been a little bit acquainted of this your broadcast
    offered bright clear idea

  15. Hey excellent blog! Does running a blog such as
    this take a lot of work? I have no expertise
    in coding but I had been hoping to start my own blog in the near future.
    Anyhow, if you have any recommendations or tips for
    new blog owners please share. I know this is off subject but I
    just had to ask. Thank you!

  16. Hello! Would you mind if I share your blog with my myspace group? There’s a lot of people that I think would really appreciate your content. Please let me know. Many thanks

  17. Awesome blog! Do you have any tips and hints for aspiring writers? I’m planning to start my own blog soon but I’m a little lost on everything. Would you suggest starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m totally confused .. Any tips? Thanks!

  18. Thanks for enabling me to attain new concepts about pcs. I also have the belief that one of the best ways to keep your notebook computer in perfect condition is a hard plastic material case, or shell, which fits over the top of one’s computer. These types of protective gear will be model unique since they are made to fit perfectly within the natural casing. You can buy them directly from owner, or via third party places if they are intended for your notebook computer, however not every laptop could have a covering on the market. Again, thanks for your suggestions.

  19. One more important part is that if you are an elderly person, travel insurance intended for pensioners is something you ought to really consider. The more aged you are, greater at risk you might be for making something terrible happen to you while in most foreign countries. If you are never covered by quite a few comprehensive insurance, you could have a few serious problems. Thanks for revealing your good tips on this blog site.

  20. Today, I went to the beach with my kids. I found a sea
    shell and gave it to my 4 year old daughter
    and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her ear. She never wants
    to go back! LoL I know this is totally off topic but I
    had to tell someone!

  21. Hi everybody, here every one is sharing these kinds of knowledge, so it’s
    fastidious to read this blog, and I used to go to see this weblog daily.

  22. Heyy would you mind stating which blog platform you’re using?
    I’m looking to start my own blog soon but I’m having a diifficult tiome deciding between BlogEngine/Wordpress/B2evolution aand Drupal.
    The reason I ask is because ypur design seems different then most blogs and I’m looking
    for something completely unique. P.S Sorry for beinjg off-topic but I had to ask!

  23. I’ve been having issues with my Windows hosting. It has set me back quite a bit while making the next list. This is the current list that I have. I should add another list in less than a week. I’ll let you all know when the next list is ready. Thank you for your patience.

  24. I don’t even know how I ended up here, but I thought this post was good.
    I don’t know who you are but certainly you’re going
    to a famous blogger if you aren’t already 😉 Cheers!

  25. Wow that was unusual. I just wrote an extremely long comment but after I clicked submit my comment didn’t appear.
    Grrrr… well I’m not writing all that over again. Anyhow, just wanted to say wonderful
    blog!

  26. excellent post, very informative. I wonder why the other experts of this sector don’t notice this. You must continue your writing. I’m confident, you have a huge readers’ base already!

  27. Good day! I just wish to offer you a big thumbs up
    for your great information you’ve got here on this post.
    I am returning to your site for more soon.

  28. Great blog here! Also your web site loads up fast!
    What web host are you using? Can I get your affiliate link to your host?
    I wish my website loaded up as fast as yours lol

  29. Heya i am for the first time here. I found this board and I find It truly
    useful & it helped me out a lot. I hope to give something back and
    aid others like you helped me.

  30. I think that everything posted made a ton of sense.
    But, consider this, what if you were to write a killer headline?
    I am not saying your content is not good., but what if you added a title that makes people want more?
    I mean How do I redirect my site using a .htaccess file?
    in simple way – Anses Blogs is a little plain. You should glance at
    Yahoo’s home page and see how they write post titles to get people
    to click. You might add a related video or a pic or two to get readers
    interested about everything’ve written. Just my opinion, it might
    make your posts a little livelier.

  31. hi!,I love your writing very so much! proportion we communicate extra approximately your post on AOL?
    I require a specialist in this area to unravel my problem. May be
    that is you! Having a look forward to peer you.

  32. 税理士紹介は、商売をするときにはとても大切になってきます。適当に税理士を選んでしまい商売が傾いてしまうケースが多いのです。こういった状況を避けるためには、実績のあるエージェントを利用するべきです。

  33. Hello there! Would you mind if I share your blog with my twitter group?

    There’s a lot of folks that I think would really appreciate your content.
    Please let me know. Thanks

  34. Hello! Someone in my Facebook group shared this website with us so I came to give it a look.
    I’m definitely loving the information. I’m bookmarking and will be tweeting
    this to my followers! Fantastic blog and superb design.

  35. Amazing! This blog looks just like my old one!
    It’s on a completely different subject but it has pretty much the same layout and design. Outstanding choice of colors!

  36. Hmm is anyone else experiencing problems with the images on this blog loading?
    I’m trying to find out if its a problem on my end or
    if it’s the blog. Any feedback would be greatly appreciated.

  37. My spouse and I absolutely love your blog and find most of your post’s to be what precisely I’m
    looking for. Does one offer guest writers to write content available for you?
    I wouldn’t mind composing a post or elaborating on a
    number of the subjects you write about here. Again, awesome site!

  38. I was curious if you ever considered changing the layout of your website? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 images. Maybe you could space it out better?

  39. A motivating discussion is worth comment. I think that you ought to publish more on this
    topic, it might not be a taboo subject but usually people don’t speak about such issues.

    To the next! All the best!!

  40. Hi! I realize this is kind of off-topic however I had to ask.

    Does operating a well-established blog such as
    yours take a lot of work? I’m brand new to operating a blog however I do write in my journal on a daily basis.
    I’d like to start a blog so I can easily share my personal experience
    and thoughts online. Please let me know if you have any recommendations or tips for brand new aspiring blog owners.

    Appreciate it!

  41. Howdy, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam comments?
    If so how do you prevent it, any plugin or anything you can advise?
    I get so much lately it’s driving me insane so any help is very much appreciated.

  42. Very great post. I simply stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. After all I will be subscribing to your rss feed and I am hoping you write once more very soon!

  43. The content inside site must be written in a way that they will
    be loved both from the search engines’ spiders together with your visitors.
    It’s a leveraging off one another’s efforts sort of strategy so that your promotions to get advertised virally,
    making your pains bigger and more successful.
    This often includes, book author, title, data, layout, color
    and so on.

  44. As we sell our products to folks, the very first governing factor that we should
    discuss will be the target consumer group.

    On top of that, with streaming movies, the quality of the films you watch is usually not affected by your computer you use.
    On the contrary there’s a solution and prepare it more inside your means.

  45. Admiring the time and effort you put into your site and detailed information you offer. It’s nice to come across a blog every once in a while that isn’t the same outdated rehashed material. Wonderful read! I’ve bookmarked your site and I’m including your RSS feeds to my Google account.

  46. Does your website have a contact page? I’m having problems locating it but, I’d like to
    send you an e-mail. I’ve got some recommendations for your blog you might be interested in hearing.
    Either way, great website and I look forward to seeing it expand over time.

  47. Did you know that my lists can be used with GSA? They can. I’m always working hard to
    improve the quality of my lists. Check them out and see if you can put them to good use.
    Thanks for visiting my site and have a great day.

  48. Howdy! I understand this is kind of off-topic however I needed to ask.
    Does operating a well-established website such as yours
    take a massive amount work? I am completely new to operating a blog but I do write in my journal daily.
    I’d like to start a blog so I can share my own experience and thoughts online.
    Please let me know if you have any kind of suggestions or tips
    for new aspiring blog owners. Appreciate it!

  49. Ϝirst off І would liкe to ѕay wonderful blog! Ihad a quick
    question wһich I’d like to ask if yoᥙ don’t mind.

    I was interested to find out how you center yourself
    and clear your thoughts prior to writing. I have haԁ trouble clearing my mind in getting my thoughtѕ ᧐ut
    there. I truly dο take pleasure in writing but iit
    just seems like the first 10 to 15 minutes are usualply
    lost simply just tгyiɡ to fiɡure out how to begin. Any suggestions or tips?
    Thaank you!

  50. Have you ever thought about adding a little
    bit more than just your articles? I mean, what you say is valuable and everything.
    Nevertheless think about if you added some great pictures or videos
    to give your posts more, “pop”! Your content is excellent but with pics and
    clips, this website could definitely be one of the most beneficial in its niche.
    Amazing blog!

  51. Hɑᴠe you ever considereⅾ аbout aⅾding a little bit more than just your articles?
    I mean, what yyou say is fundamental and everything.
    Nevertheless think of if you added some great piⅽtures or videos to give your possts more, “pop”!
    Your content is excellent but with imagеs and clips, this weЬsite could defіnitely bе one
    օf the greaest іn its field. Sսperb blog!

  52. It is appropriate time to make a few plans for the future and it’s time to be happy.
    I have read this submit and if I may just I want to counsel you some
    interesting issues or advice. Perhaps you could write next articles
    relating to this article. I desire to learn even more things approximately it!

  53. This is really interesting, You’re a very skilled blogger.
    I have joined your feed and look forward to seeking
    more of your magnificent post. Also, I’ve shared your web site in my social
    networks!

  54. Hi there just wanted to give you a brief
    heads up and let you know a few of the pictures aren’t
    loading properly. I’m not sure why but I think
    its a linking issue. I’ve tried it in two different web browsers and both show the same
    outcome.

  55. I’ve been surfing on-line more than 3 hours today, but I never found any interesting article like yours.

    It is beautiful value enough for me. In my view, if all site
    owners and bloggers made excellent content as you did,
    the web will probably be a lot more useful than ever before.

  56. I do not even know how I ended up here, but I thought this post was great.
    I don’t know who you are but certainly you’re going to
    a famous blogger if you are not already 😉 Cheers!

  57. My brother recommended I would possibly like this blog.

    He was once totally right. This submit truly made my day.
    You can not imagine just how so much time I had
    spent for this information! Thanks!

  58. I think what you published made a ton of sense. However, think on this, suppose you composed a catchier title?

    I ain’t saying your content isn’t solid, but what if
    you added a post title to possibly grab folk’s attention? I mean How do I redirect my site using a .htaccess file?
    in simple way – Anses Blogs is a little plain. You could look at Yahoo’s home page
    and note how they create article headlines to get viewers to click.
    You might add a video or a related pic or two to grab readers excited about what you’ve got
    to say. Just my opinion, it might make your posts a little livelier.

  59. I do trust all of the concepts you’ve introduced in your post.
    They are very convincing and can certainly work. Nonetheless, the posts are too quick
    for beginners. May you please extend them a bit from subsequent time?
    Thank you for the post.

  60. Hi! Would you mind if I share your blog with my myspace group?
    There’s a lot of people that I think would really appreciate your content.

    Please let me know. Thank you

  61. Hi there! I just wanted to ask if you ever have any issues with hackers?
    My last blog (wordpress) was hacked and I ended up losing many months of
    hard work due to no back up. Do you have any methods to stop hackers?

  62. I do agree with all the ideas you’ve offered to your post.
    They’re really convincing and can definitely work. Nonetheless, the posts are very quick for starters.
    Could you please extend them a little from subsequent time?
    Thank you for the post.

  63. Greetings, There’s no doubt that your website might be having web browser compatibility issues.
    Whenever I take a look at your website in Safari, it looks fine however when opening in Internet Explorer, it’s got some overlapping issues.

    I simply wanted to give you a quick heads up! Apart from that, fantastic site!

  64. Nice post. I was checking continuously this blog
    and I’m inspired! Very helpful information specifically
    the closing part 🙂 I maintain such info much.
    I used to be looking for this particular information for a very lengthy time.
    Thank you and good luck.

  65. Wonderful site you have here but I was curious if you knew of any message boards that cover the same
    topics talked about here? I’d really like to be a part of group where I can get
    responses from other knowledgeable people that share the same interest.
    If you have any suggestions, please let me know. Thank you!

  66. Hi there! I could have sworn I’ve been to this site before but after reading through
    some of the post I realized it’s new to me. Nonetheless, I’m definitely delighted I found it
    and I’ll be book-marking and checking back often!
    라인티비
    라인티비
    스포츠중계
    스포츠중계
    스포츠중계

  67. With havin so much written content do you ever run into
    any problems of plagorism or copyright violation? My site has a lot of
    unique content I’ve either written myself or outsourced but it
    appears a lot of it is popping it up all over the internet without my agreement.

    Do you know any methods to help protect against content from being stolen? I’d really appreciate
    it.

  68. I would like to get across my gratitude for your kind-heartedness giving support to people who require guidance on this topic. Your real dedication to getting the solution up and down became especially helpful and has usually enabled most people much like me to reach their targets. Your personal useful guidelines means much a person like me and somewhat more to my office workers. Best wishes; from everyone of us.

  69. It’s a shame you dߋn’t hаᴠe a donate button! Ι’ⅾ without a doubt donate
    to this fantastic blog! І suppose f᧐r noᴡ
    i’ll settle for bookmarking and adding your RSS feed to mү Google account.
    Ι ⅼook forward to fresh updates аnd ᴡill share tһis blog with my
    Facebook ցroup. Talk ѕoon!

  70. I together with my friends were actually reading the good tips and hints from the blog and then suddenly got a terrible feeling I had not expressed respect to the website owner for those secrets. Those people appeared to be for this reason excited to read all of them and already have simply been taking pleasure in those things. Thanks for turning out to be so helpful and for settling on such important things most people are really wanting to understand about. Our honest regret for not expressing gratitude to sooner.

Leave a Reply

Your email address will not be published. Required fields are marked *