Jump to content

URL Rewriting not working


newb

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/204582-url-rewriting-not-working/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.