This patch will set a warning message to users so that they can update their bookmarks or correct links.

Comments

apsivam’s picture

I just applied this in my personal website
you can see this in action here
www.apsivam.in/tips/no_www_to_www_redirection this will take you to www.apsivam.in/guides/webmaster/www_redirection with the info message set

jjeff’s picture

Status: Needs review » Needs work

I like this, but I think this should be a setting for the site administrator. Having a drupal_set_message() on the page will cause a full page load when page caching is turned on. This could be a performance problem.

Also there are many situations where the administrator would not want to the message to show up (tinyurl style). I sort of think that this should be a per-redirect option with a checkbox for "display redirect message" or even possibly a text field for the admin to be able to enter their own custom text.

apsivam’s picture

Definitely a good idea. Let me come up with new patch.

HorsePunchKid’s picture

Status: Needs work » Needs review
StatusFileSize
new3.12 KB

Here is an updated patch that includes a settings form and some code for #167265.

HorsePunchKid’s picture

Status: Needs review » Fixed

Seems to be working fine. I committed this without the nodeapi stuff and with a couple of minor corrections.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

eiland’s picture

Version: 5.x-1.x-dev » 6.x-1.0-beta6

This doesnt work flawlessly in v.6, if the message is turned on an extrmely ugly 404 is shown when "Display a warning message to users when they are redirected." is shown:

Page not found
This page has been moved to http://www.nl/page/. You will be automatically redirected in 10 seconds.
The requested page could not be found.

In the v5 is was a very polite

Doorverwezen vanaf old/page

eiland’s picture

Status: Closed (fixed) » Active
dave reid’s picture

Status: Active » Closed (fixed)

This is basically the same as the D5 version, so if there's something to be improved, please don't re-open very old closed issues.