Forum Moderators: phranque
If they are moving, do you want to carry on using the old URLs for the new internal location of the file?
Whether they are moving or not, do you want to have new URLs for your pages? You don't have to have new URLs.
There's two solutions. One involves redirects, the other involves rewrites.
Which you need depends on what you actually want to do.
Be very clear as to the differences between a redirect and a rewrite and what each one can actually do for you.
If you insist that you need new URLs, then you will need to link to the new URLs from the pages of your site. It is 'links' that define URLs. You will also need to redirect requests for old URLs so that browsers are forced to make a new request for the new URLs.
Hopefully you now understand that you might not have to have new URLs at all...
Thanks for explaining this my problem is i am using joomla and some how one component (joomla related) is making duplicate urls with two names
like my example above.
i think my writing old and new confused you a bit it must be rather
current url ( what i want to retain )
http://example.com/tag1/page.html
duplicate url
http://example.com/tag2/page.html
i think what i want is a Mod Rewrite ( if i am not wrong) i think a .htaccess line will do it , or may be alias its just that i know very little about these things. so i am looking if someone can suggest me a solution for this ....
Dee
URLs are defined by links. Therefore the best solution is to modify the link generation script to write out the 'correct' URL in the link.
Whether you do that or not, you should also redirect requests for one URL type over to the other type. You can do this without doing step one, above, but it is very bad form for internal navigation clicks to pass through a redirect when navigating round a site. The main reason for the redirect is to force usage of the new URL for anyone that has stored the old URL in bookmarks, as a link from another site, or in a searchengine index, etc.