Hello,
I have to redirect my dynamic pages to static one and with adding keywords to it, so please tell me that it is possible to redirect URL from a text which is not present in the URLs. See Example
My pages are like
example.com/page.php?pageid=2
Now I want to redirect this URL to
example.com/page-2-somekeywords.html
I created a script which will only redirect example.com/page.php?pageid=2 to the example.com/page-2.html
I do not know how to add these keywords in URL and I do some changes in my script but that does not help
My Script is:
RewriteCond %{QUERY_STRING} ^pageid=([0-9]*)
RewriteRule ^page\.php$ http://www.example.com/page-%1\.html? [R=301,L]
#If the condition true go here and redirect this URl
RewriteRule ^page-([0-9]*).html$ http://www.example.com/page.php?submit=submit&pageid=$1 [L]
Thanks
Please reply fast, I am thankful to all responders in advance.