I'm trying to achieve the following:
anydirectory/index.php?query _str --> anydirectory/index2.php?quer y_str
anydirectory/anysubdirectory/index3.php?quer y_str --> anydirectory/anysubdirectory/index4.php?quer y_str
What I need is to do a 301 from a page inside a directory to another page inside a directory (it's the same page name for every directory in my website, so, I know which are both pages but not which is the directory as it could be anything)
Same thing with a subdirectory.
I tried with this, but I suck with RegExp:
RewriteRule ^(^/)+/index1\.php$ $1/index2.php [R=301,L]
RewriteRule ^(^/)+/(^/)+/index3\.php$ $1/$2/index4.php [R=301,L]
Any help on this?
Many thanks
anydirectory/index.php?query _str --> anydirectory/index2.php?quer y_str
anydirectory/anysubdirectory/index3.php?quer y_str --> anydirectory/anysubdirectory/index4.php?quer y_str
What I need is to do a 301 from a page inside a directory to another page inside a directory (it's the same page name for every directory in my website, so, I know which are both pages but not which is the directory as it could be anything)
Same thing with a subdirectory.
I tried with this, but I suck with RegExp:
RewriteRule ^(^/)+/index1\.php$ $1/index2.php [R=301,L]
RewriteRule ^(^/)+/(^/)+/index3\.php$ $1/$2/index4.php [R=301,L]
Any help on this?
Many thanks