Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 04:42:24 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: *Solved* Always redirect home page to root?  (Read 1993 times)
Dreamer

Offline Offline

Posts: 19



WWW
« on: February 05, 2008, 01:57:24 AM »

Hi, when I click 'home' on my site I would like to return to the root, not mydomain.com/pages/home.php

One of my templates does this but the other does not and Im not sure what to change.

I've tried the advanced settings for homepage redirection but it does not do what I need.

« Last Edit: February 22, 2008, 10:47:46 PM by Dreamer » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #1 on: February 05, 2008, 09:44:46 AM »

Hello,

The "home page redirection" is exaktly the option you need. If enabled the root page shows only the URL, if disabled it shows the whole path with pages dir.

So if you see no affect, maybe you should clean your browser cache.

Matthias
Logged
Dreamer

Offline Offline

Posts: 19



WWW
« Reply #2 on: February 07, 2008, 07:27:34 AM »

Thanks for the reply,
I cleared my cache and it's the same problem.
The homepage redirect works as expected when directly navigating to my domain, however when navigating to the homepage from an inner-page I still get the long URL on one site.


« Last Edit: February 22, 2008, 10:42:59 PM by Dreamer » Logged
Dreamer

Offline Offline

Posts: 19



WWW
« Reply #3 on: February 22, 2008, 10:47:17 PM »

I solved this problem with htaccess, the templates had completely different menu routines which were too complicated for me.

So if anyone wants to redirect their home page to root which looks better just do this:
Code:
RewriteEngine on
RewriteRule ^pages/home.php / [R=301,L]

This uses a 301 redirect so any page ranks or incoming links will be preserved for SEO purposes.
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!