Not sure how to word this one but will explain most I can.

I am trying to make the following happen.

  1. Re-write this http://example.com

  2. To this http://example.com/home/

Is it possible ?


Simone Carletti - the method you posted did not work, have you had this work ? Also would it visually change in the browser URL bar to say /home/

John Conde ♦ - this did not work either I was getting a warning from Firefox saying it would never complete so it did not load the page.

  • @danlefree He tagged the question as htaccess, thus we can assume he's using Apache. – Simone Carletti Oct 7 '11 at 0:08

If you want to redirect A to B, simply place the following directive in your .htaccess file:

Redirect / http://example.com/home/

If you want to rewrite / as /name

RewriteEngine On
RewriteRule ^/$ /home/ [L]

I'm not an expert at this so this may be wrong. If so, let me know so I can either correct it or delete it.

RewriteEngine on
RewriteRule ^$ /home/[L,R=301]


This stackoverflow questions seems to ask the same question. Check it out and see if you find a solution there. If so, let us know so we can post it here for future reference.

  • This did not seem to work, but thanks. – Mr Obvious Oct 6 '11 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.