php - Redirect OLD urls to NEW urls. Rewrite Rules or something else -


currently our website uses custom made encrypted urls, example: domainname/index.php?case1=616c6c50726f647563747347656f7267654d617a67616c6f764d794d6f746f2e4247214023&case2=70726f6d6f47656f7267654d617a67616c6f764d794d6f746f2e4247214023

this retrieves discounted products on our website.

we plan rewrite urls make them user/seo friendly, old urls (like 1 above) still work.

which of following options best achieve this?

  1. check url in address bar in every site request , if symbols found redirect old urls.

or

  1. use rewrite rule redirect index?case1=xxxx new urls

which fastest solution? give example rewrite rule of given link above, redirect homepage example.

the fastest solution server level rewrite (you didn't mention server you're using).

i tend rewrites @ app level, because find them easier test , more flexible deploy.

in case, seems rewriting involve decrypting url, i'm not sure how done in .htaccess file. seems you'd need app loaded.


Comments