I have moved site from one framework to another and now I would like to redirect important pages (around 20). How to redirect them using apache rewrite? Here are examples:
Old: http://mydomain.com/ba/stream.php?kat=15
New: http://www.mydomain.com/bs/about-us/our-partners
Old: http://mydomain.com/ba/stream.php?kat=29
New: http://www.mydomain.com/bs/catalogues/it-catalogue
Also, after important pages are listed, I'd like to redirect all remaining links in form:
http://mydomain.com/ba/whatever-is-here
to
http://www.mydomain.com/bs/
Following TerryE's suggestion, I'll attach my latest code which is not working :)
RewriteCond %{QUERY_STRING} ^kat=15$
RewriteRule ^stream\.php$ http://www.mydomain.com/bs/about-us/our-partners [R=301,L]
One more note: I use this code to redirect root domain to www subdomain:
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]
I have placed this root to www code below code for specific pages redirection, and when I test http://mydomain.com/ba/stream.php?kat=15
in browser, I am redirected to http://www.mydomain.com/bs/ba/stream.php?kat=15