Tonny Kluften
Administrator
Jeg har et nettsted som jeg skal bytte CMS på. Urlene vil bli nye. Jeg har masse innlinker til forskj. sider på nettstedet og vil ta vare på de.
Gamle urker er:
nettsted.com/view_recipe.php?id=7226&recipe_title=Pork_with_chili_
Nye urler blir
nettsted.com/Pork-with-chili
Fikk en forklaring på engelsk, men jeg vet ikke hvordan jeg skal gjøre det, altså hvordan skal koden jeg skriver i view_recipe.php se ut?
Forklaringa jeg fikk:
This would be one of those times a scripted redirect would be a much better option than an .htaccess redirect. The search engines don't care and won't even know that you're using a scripted redirect and not .htaccess.
You'd have to have map out the old url query strings and the new ones, but setting up a little case/switch routine in the view_recipe.php page that performs a proper 301 redirect from the old pages to the new ones should be fairly straight forward. Just make sure you declare it to be a 301 Moved Permanently redirect in the first Location: line.
Gamle urker er:
nettsted.com/view_recipe.php?id=7226&recipe_title=Pork_with_chili_
Nye urler blir
nettsted.com/Pork-with-chili
Fikk en forklaring på engelsk, men jeg vet ikke hvordan jeg skal gjøre det, altså hvordan skal koden jeg skriver i view_recipe.php se ut?
Forklaringa jeg fikk:
This would be one of those times a scripted redirect would be a much better option than an .htaccess redirect. The search engines don't care and won't even know that you're using a scripted redirect and not .htaccess.
You'd have to have map out the old url query strings and the new ones, but setting up a little case/switch routine in the view_recipe.php page that performs a proper 301 redirect from the old pages to the new ones should be fairly straight forward. Just make sure you declare it to be a 301 Moved Permanently redirect in the first Location: line.