Nicholas Thompson has just committed a new module called Global Redirect.
Essentially, the module checks to see if a given node url has been assigned an alias, and if so, uses a permanent redirect to that alias. Currently if you are using url aliasing - say through the path_auto module - you are left with the old numberic url ("node/1234") and the new aliased url. You therefore risk being punished by Uncle Google for serving duplicate content.






Definatly going to check that one out. If only there was a solution for the forwad-slash problem.
I wonder if extending this module might be a good way to solve that problem.
Do I understand correctly that the logic would need to be:
1) Check if the user is viewing a node
2) If so, check if the url has a trailing slash
3) If it doesn't have a trailing slash, send a 301 redirect to the same url with a trailing slash appended
?
It shouldn't be difficult to add that to the Global Redirect module, if that's all it would take. I'd be happy to write a patch.
It could probably easily be modified for that... However we'd need to definately know there are no cases where a trailing forward slash is definately needed...
Hi, just popped in here through a random link. Hi, firstly I'd like to say your site is great and very impressive. Enjoyed the reading.
Maybe it should be an option that can be enabled/disabled through a settings page, with the default set to disabled.
That way, it can be off except for people that want to test it out. If there appear to be situations where it is causing problems in some setups, one solution might be a textarea on the settings page where site admins can list urls that shouldn't be tampered with ... similar to how block visibility is handled.
thanx for your writing to post, I like your web site and good lucky. Regards.
Possibly - however could this also not be achieved by a nifty piece of Apache redirecting magic (as hyrcan says in his post in the above quoted thread - http://drupal.org/node/83630#comment-154568)
You could also use PHP's header or redirect function, or better, just work on it through Javascript.
I can see the argument for both. The major benefit I'd see from doing it from within Drupal is that - unlike with Apache rewrite rules - you have access to some handy information such as whether the user is viewing a node. The problem that hyrcan ran into re: the login system would be circumvented. As would a whole host of others that would take individual rewrites to deal with, because the information you need just can't be parsed from the url. Plus htaccess modifications are pretty esoteric to a lot of people who are perfectly comfortable installing a contrib module.
BUT -- I think this may all be moot, anyways. Moshe is prompting you to submit your module code as a patch against core. http://drupal.org/node/88146
:)
Taking hyrcan's advice, we've added the proper rewrite rules and are set to push the website to production (we'll see if anything else comes up). After some testing, the decision was made for /node, /admin, and /user not to be effected by the rewrite rules I remember not being able to change some settings if /admin wasn't excluded, while /node was excluded due to some (potentially unrelated) file upload issues and as a just-in-case measure.
In the process of implementing the rewrites, the conf file was tweaked and re-ordered a couple of times due to conflicts with other rewrite directives. Perhaps further proof that it might make more sense to do it on the Drupal level.
As for the logic behind how it should work -- if the path appears to be a file name (i.e. .html), no forward slash should be appended. Otherwise, if it appears to be a directory - it should be treated in the same way Apache treats a directory accessed without a forward slash: it does a 301 redirect.
There's an alternative to using Global Redirect, if you'd rather control things manually. Take a look at my Drupal SEO article, I've got some tips on using .htaccess and robots.txt to achieve similar results without the need for a new module.
nice article, thanks for sharing!
Why not just remove the alias instead of all this redirecting? i think i must be missing something. Nice Drupal theme though.
Got a lot of advice on solving redirection problems here, thank you.
I also believe that such a module is not necessary. Diverting easily achieved file .htaccess
It is great popping in that blog which is a quite old one. But it is good collecting some experiences for better understanding.
You therefore risk being punished by Uncle Google for serving duplicate content.
3freester
Thanks for the tutorial, it is very helpful.
thanks !
منتديات
توبيكات جديدة وحصريه
ومريت على قسم كول فيه صور
ماسنجر و رموز ماسنجر
وحتى خلفيات ماسنجر
و ثيمات ماسنجر
موجوده وللي يحبون الكوره فيه
تغطيات رياضية وفيه
اخبار رياضية وعجبني
بعد قسم الرسائل فيه رسائل
كول و برامج للجوال و
ثيمات للجوال و
العاب للجوال كلها
حصلتها واممممم بالنسبة للبنات حدث ولاحرج فيه
فساتين خفق و
ازياء جديدة لافضل
المصممين و ديكور
للمنزل و اطباق و
حلويات وقسم عن صحة
الانسان وجمال الجسم و
العناية بالبشره وللي يحبون الخواطر والشعر فيه
خواطر حزينه وخواطر
شوق تعبجكم و قصص للي
يحبون القصص والاقسام الترفيهه قسم الصور مميز
صور روعه واغلبها صور
جديدة وغريبة ومضحكة وللبنوتات الصغار فيه
العاب طبعا
العاب بنات يحبها
قلبكم نجي للتصميم وعشاق الفوتوشوب فيه
صور للتصميم و
فلاتر و
فرش تحبها قلوبكم و
برامج حماية و
بلوتوث جديد واللي
يحبون الاناشيد فيه اناشيد
اطفال واسلامية جديدة نجي لأهم شي
سيرة الرسول صلى الله
عليه وسلم وسيرة الصحابة
و اذكار وادية
موجوده الله ينفعنا بها وبس
nice post..thanks
Victorias Secret
Victorias Secret Womens Clothing
Victorias Secret Bra
Victorias Secret Swim Wear
Victorias Secret Thong
Victorias Secret Credit Card
Victorias Secret Angel Credit Card
Victorias Secret Online Catalog
Victorias Secret Coupon Code
Victorias Secret Coupon
Victorias Secret Coupon Code
Victorias Secret Pink
Victorias Secret Lingerie
Victorias Secret Angels
Victorias secret promotion code
Victorias Secret Commercial
Victorias Secret Store Location and Outlets
Victorias Secret Products
Victorias Secret History
Victorias Secret Sale
Victorias Secret Models
Victorias Secret Fashion Show
Thanks for sharing that. This is a nice Drupal Application but is accompanied by its own set of cons.
Perhaps further proof that it might make more sense to do it on the Drupal level.In the process of implementing the rewrites, the conf file was tweaked and re-ordered a couple of times due to conflicts with other rewrite directives.
alright. Thanks for the instruction. But is that going to make the task easier? Anyways keep posting this warning like information oftenly.
the title of this most is mosr appropriate. I would like to thank you for drawing our attention towards this important issue.
Perhaps further proof that it might make more sense to do it on the Drupal level.In the process of implementing the rewrites, the conf file was tweaked and re-ordered a couple of times due to conflicts with other rewrite directives.
registry cleaners
("node/1234") the remote computer did not respond in the timimg manner, first solve this problem then go to find the soloution for how to enter in "node alias ",thats give a relief fromthat big loozy problem ,i think ?
Good suggestion.
Thanks for sharing.
finding a solution is just like " to find a coin in ma pond" now in your this article%
A pair of jordan shoes or ugg boots? I think you prefer air jordan shoes cos a pair of basketball shoes can help you much in the match. However, someone may saying like this: hey, give me some
Hi!
Hi!
nice post!
I recently came accross your website. Its my first time at your site and I enjoyed reading your post. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. This is a really great site with alot of good well written post. Thanks so much for the extra information.
how can you find a solution if you don't know what's the "problem exactly",fake post this was huh! i said sorry for you
Hello! Good post there :) cheers
interesting article thanks for sharing.
Uncle Google is always right! :D
Man, if only there were an easy solution to duplicate content!