I have some rewrite rules like this RewriteRule ^/?([-A-Za-z0-9]+)/?$ index.php?sectionname=$1 [L]
RewriteRule ^/?([-A-Za-z0-9]+)/([-A-Za-z0-9]+)/?$ index.php?sectionname=$1&categoryname=$2 [L]
^/?([-A-Za-z0-9]+)/([-A-Za-z0-9]+)/([A-Za-z0-9-]+)/?$ index.php?sectionname=$1&categoryname=$2&title=$3 [L]
This rule
RewriteRule ^/?([-A-Za-z0-9]+)/([-A-Za-z0-9]+)/?$ index.php?sectionname=$1&categoryname=$2 [L]
rewrites a url to this
www.mydomain.com/sectionname/categoryname/
The problem that I have is that I have some old pages that I need to redirect to these new pages that I have rewritten urls for
My old page that i want to redirect is like this
www.mydomain.com/myoldsection/myoldcategory/
and I want to redirect it to my new page
www.mydomain.com/tv/video/
It wont work, and seems to add the full url to the end after the slash
like this
www.mydomain.com/section/category/index.php?sectionname=tv&categoryname=video
I have tried everything. It seems that the rewrite and redirect clash due to them workin on the same part of the URL (between the slashes)
I would be really grateful for any tips on how to get around this issue.
Or is there a better way than using htaccess to rewrite?
Cheers