hey well I’m trying to change the url structure using the htaccess file and I’m rewriting my old structure to the new one, although I’m having some issues.
I’m using the following code
RewriteRule video-(.*)-(.*).html?$ http://mysite.com/download-$2-video-$1.html [R=301,L]
Now the problem I’m running into is that when I try to redirect something like
http://mysite.com/video-1-this-is-the-title.html
it’s redirecting it to
http://mysite.com/download-this-video-1.html
instead of
http://mysite.com/download-this-is-the-title-video-1.html
if anyone could help that would be great! 🙂
If the first backreference is always going to be numbers, you could try changing your regular expression to: