Forum Moderators: open
How do I replace links if they change at a future time?
How do you track clicked links. I am not sure if Google analytics can do it. I know java script and prefixing the actual links with a server side redirect script are two options. The second approach has repurcussions for SEO though.
Any other approaches?
Read Tim Berners-Lee original on this
[w3.org...]
If you think it through and get them right, you shouldn't have to change. If you have to change, you can always do redirects on the server.
Reasons for change to links:
1) Your website grows -- most websites do
2) Optimization -- you are setting up another server for content that needs to be removed from actual site and move to another site.
3) External page that you don't have control over.
4) You want to change your URI for other reasons like you want to organize your site for consistency with changes. For example, I have my products urls as:
/products/category/prod1
But, at a later time i added sub-categories and want to make my URIs consistent instead of 'cool'. So I want to modify to
/products/category/sub-category/prod1
Just because someone (even the one from W3Schools!) thinks URIs should be cool doesn't mean I drink the same cool-aid forever. :-)
You can go in and edit your permalinks in Wordpress and your URL aliases in drupal, as two examples, but that only handles the navigation and so forth. In other words, it doesn't help with incoming links or with links hand-coded within content. It would take care of that category situation you meant with respect to navigation and what not.
For handling incoming traffic, you would need to do 301s either in your apache config, .htaccess or using plugins like Global Redirect in drupal and Redirection in Wordpress (I might have those names wrong) that will help with some of the redirect issues and creating 301s and whatnot.
So some of that you and certainly do from within the admin interface of those apps and probably most others. But of course, there are limitations.
>>W3Schools!
From W3C ;-)
- handcode, obviously
- WYWISWYG editor (so you're still adding the tags, but not hand coding exactly)
- filters: find words, phrases, whatever and automatically make them into links. I've never done it, but I suppose you could have a link like link1234 and filter on that. Then if that link goes dead, it would update.
- link field. You can use CCK (unique to drupal) that creates a link field on the form entry. This of course will not be integrated into runing text like a filter would.
Where are you trying to go to and from? Because of course you can also use something like the Redirection plugin in WP so that a link can be set to
example.com/go/destinationA
And then if destinationA changes, you could just change how that URL maps. Of course, you could do this with internal links as well. Typically you would want to exclude /go in your robots.txt
Still not sure I'm answer your question at all.
As to my first question, I understand that there is no way to replace links other than editing the links in the node content/body. Of course, I could write update SQL to bulk update the links directly. Exactly what I thought. Using a WYSIWYG editor module doesn't change much. CCK fields technique doesn't even work in the first place.
My second question: tracking link clicks. If I do like webmasterworld does (a cgi redirect script), the links wouldn't be seo friendly.
Thanks you.