I am wondering wether it's possible to use Apaches
.htaccess to rewrite a folder name - using a WordPress function.
Lets say I have a url like:
Now I want to rewrite the url to (for example)
folder1 is an existing url. How can I change it to
The following I found "somewhere in the internet":
<IfModule mod_alias.c> RedirectMatch 301 /testing/folder2/(.*) /folder1/folder2/$1 </IfModule>
I need it as a PHP function to use it in WordPress.