Forum Moderators: phranque

Message Too Old, No Replies

Possible to rewrite root ?

         

Mr_Obvious

9:27 am on Oct 7, 2011 (gmt 0)

10+ Year Member



Hi everyone.

Is it possible to rewrite the root ?

For example;
domain.co.uk/ rewrites to domain.co.uk/home/

/home/ already being a rewrite of index.php

Cant seem to find a clear answer on this one, and what i try either results in a request that will never complete.

Thanks

tangor

9:44 am on Oct 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome, Mr_Obvious... suggest you check the forum library for many examples. This is an often requested and many times answered query.

Mr_Obvious

9:58 am on Oct 7, 2011 (gmt 0)

10+ Year Member



Being new to the site, where can one find the 'forum library'

I did a search on this site and could not find my answer, do you know the post containing the example ?

Regards

lucy24

6:15 pm on Oct 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



domain.co.uk/ rewrites to domain.co.uk/home/

It probably doesn't. It probably redirects, unless you do fancy business with proxies.

While you are searching, you might take time out to see how to get rid of the double redirect. If you want to end up in /home/, there should be no need to detour via /index. Unless you are doing the perennially popular Redirect-plus-Rewrite two-step.

g1smd

6:28 pm on Oct 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do you mean rewrite, or do you mean redirect?

Do you want to request example.com/ and be redirected to example.com/home/ be served content in the /home/ folder and see the URL bar change to example.com/home/ too? This is a redirect.

Do you want to request example.com/ and be served content in the /home/ folder but continue to see only example.com/ in the URL bar? This is a rewrite.

Both of those things can be enabled by using a RewriteRule.