newb Posted June 12, 2010 Share Posted June 12, 2010 my website URL rewrites arent working properly: SEO URL: http://www.clickrewrite.com/2/1/sports-betting-champ/ Long URL: http://www.clickrewrite.com/index.php?cid=2&p=1&name=sports-betting-champ when i enter the SEO URL in the address directly it works, but the long url doesnt redirect to the shortened SEO friendly URL. i want the long URL to redirect to the SEO URL automatically when entered but it doesnt. how can this be fixed? here is my .htaccess Options +FollowSymLinks -MultiViews RewriteEngine On RewriteRule ^([0-9]+)/([0-9]+)/([a-z-]+)\/$ /index.php?cid=$1&p=$2&name=$3 [NC,L] RewriteRule ^([0-9]+)/([0-9]+)/$ /index.php?cid=$1&p=$2 [NC,L] RewriteRule ^([0-9]+)/$ /index.php?cid=$1 [NC,L] EDIT: also how is it possible for me to replace all the long url links in my source code w/ the new SEO URL links Quote Link to comment https://forums.phpfreaks.com/topic/204582-url-rewriting-not-working/ Share on other sites More sharing options...
cags Posted June 12, 2010 Share Posted June 12, 2010 That's really not the way mod_rewrites should work. You should be changing all the URLs on your site to the SEO URL, you shouldn't really be redirecting the Long URL to the SEO URL at all. Quote Link to comment https://forums.phpfreaks.com/topic/204582-url-rewriting-not-working/#findComment-1071172 Share on other sites More sharing options...
newb Posted June 12, 2010 Author Share Posted June 12, 2010 ok so theres no way i can redirect all of the long URL requests to the new SEO URL so theres no duplicate content? Quote Link to comment https://forums.phpfreaks.com/topic/204582-url-rewriting-not-working/#findComment-1071173 Share on other sites More sharing options...
cags Posted June 12, 2010 Share Posted June 12, 2010 There isn't duplicate content as they both assumably point to the same file? Which means you would cause a loop by redirecting it. It can be got around by I don't really see the point, as said you should be updating all links to the SEO URL, and you will have no problems with missing links because if the person uses the Long URL it will still work and as soon as they click a link they will be in the new format. Basically you'd be better off updating your links rather than bothering with such re-writes. Quote Link to comment https://forums.phpfreaks.com/topic/204582-url-rewriting-not-working/#findComment-1071222 Share on other sites More sharing options...
newb Posted June 13, 2010 Author Share Posted June 13, 2010 alright, thanks for the info. ive updated the links on my pages Quote Link to comment https://forums.phpfreaks.com/topic/204582-url-rewriting-not-working/#findComment-1071325 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.