First, identify the different variables and values ??that may be present in the url:
http://www.example.com?<span style="color: #ff0000;"> var stri = 7 & kword =</span>
Rewrite these urls so that humans can understand them and they contain keywords for the engines, making sure to use only alphanumeric characters and separations valid as the dash -.
http://www.example.com/ <span style="color: #ff0000;">key-word </span>- 7. html
Match the old urls to new urls using. Htaccess to the root of your website by adding a line like this:
---
RewriteEngineOnRewriteRule ([az az ]*-?[ ]*?)? - ([0-9] +) . Html $ / index.php? Var stri = $ 2 & = $ 1 [L]
Find function of your script that generates the urls and modify or override for it generates the new format. If urls are stored in files or hard in a database, export all files change urls with a script and import the files.
You are thinking it’s over? Not at all. You must now redirect all old urls or at least all the old urls with external links (as seen on webmastertools and in your log files) to your new format url 301 if you have already written the function which reflects the old to the new format in PHP for example you can use it directly by making these referrals in your PHP files. This pseudo code is in place early in the PHP file before anything else is sent.
<? Php/ / Makenewurl should generate the new format url from the old and add the domain rootif (isoldurl ()) {$ NewURL makenewurl = ($ _SERVER ["REQUEST_URI"])header ('HTTP/1.1 301 Moved Permanently', false, 301);header ('Location: $ newURL');exit ();}?>
