Hi,
Can someone please help me to write couple of lines of code for my htaccess file. I'm not a programmer and this is really a small thing I want to accomplish myself on a way of understanding more of that coding.
So i have a wordpress site with 2 URLs that i want to redirect (as i understand it) to homepage
example.com/URL1/
example.com/URL2/
This are wordpress pages and each of them has subpages.
example.com/URL1/URL1-1/URL1-1-1/
example.com/URL2/URL2-1/URL2-1-1/
etc...
I'm putting a simple redirect rule
Redirect permanent /URL1/ http://www.example.com/
Redirect permanent /URL2/ http://www.example.com/
which works, but unfortunately it also redirects its subpages to homepage as well, i.e. automatically redirects this example.com/URL1/URL1-1/URL1-1-1/ to example.com
Can someone please specify a proper expression when only the specified URL will be redirected.
I've read a lot on using regex but couldn't form the working line of code.
Also for more knowledge and information what will be better for this case - redirecting or rewriting (sorry for this very newbie and basic question).
Thanks