Closed (fixed)
Project:
Global Redirect
Version:
4.7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2006 at 12:12 UTC
Updated:
28 Nov 2006 at 17:15 UTC
As we define the home page in the admin, it would be marvelous to have that page redirected to the root automatically.
ex:
when home page is: node
then redirect http://example.com/node to http://example.com/ without checking the aliases...
At this time I made an alias for /node => / that results in a redirect to http://example.com// almost perfect if it wasn't for the double slashes at the end...
Thanx for this great module!
Comments
Comment #1
RayZ commentedSpelled "foam" wrong.
Comment #2
RayZ commentedJust kidding :-)
Comment #3
nicholasthompsonThanks for (eventually) correcting the typo RayZ :-)
I wonder if this is a similar issue to that of the trailing slash problem described in your other issue (http://drupal.org/node/89703)
I will investigate.
Comment #4
ednique commentednot really... and yes a little...
I'm just saying that if you take the default homepage admin setting,
you could redirect any request to that default page to the root (http://example.com)
If that is done I can remove my dirty fix...
where I add a url alias for /node pointing to / (the to cannot be blank...)
thanx to the redirection when I type http://example.com/node I'm redirected to http://example.com//
With the alias in place a lot of "Home" links have the url http:/// ... not so good...
that's why I want to get rid of the alias...
so I thought the redirect would be great...
people going to http://example.com/node would be redirected to http://example.com because node is entered in the admin as being the home page...
maybe restrict this action and only redirect the home node if NO alias exist for that node...
If their is an alias just redirect to the alias...
it could be that someone puts index.html as the alias of /node and in that case one would expect to see index.html
Comment #5
nicholasthompsonInteresting - so when its doing its alias check, it could also do a check to see if the current URL is the current site homepage...
Thought.... Whats if
The module would see an alias is present and try to redirect to that alias - however that alias is NOT the homepage... Then again - does drupal allow aliases in the site homepage or is it system URL's only?
I can see that this module could EASILY solve this problem - however I want to make sure nothing gets broken in the process.
Comment #6
ednique commentedYes drupal allows an alias for the homepage
I can emagine that the site would be redirecting forever in your example..
Thus as I stated before this module should only redirect to the home page if NO alias defined...
Comment #7
nicholasthompsonok... Thinking about it - using my above example, would this work?
Comment #8
ednique commentedSeems good to me...
Comment #9
nicholasthompsonMostly fixed in 1.3 - it only compared the current url to the site's frontpage - it doesn't check for any aliases of the frontpage. I cant think of any situation where you have aliases of a frontpage - you should never need to view it on its own anyway (hence this patch).
Comment #10
(not verified) commented