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
Share on other sites

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.

Link to comment
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.