I am working on a WordPress site that uses an e-commerce engine for some of the account functions of logged in users. I am able to control what pages users see and what content they are able to interact with in most places on the site, however one URL needs to be directed to the account page, but I do not need redirection on the not child pages.
Example:
mydomain.com/baseurl –> should redirect to customer account page. But I do not want to redirect child pages.
mydomain.com/baseurl/some-child-page/product –> should not redirect anywhere and just display normally.
I already tried the htaccess:
Redirect /baseurl http://mydomain.com/customer-account-page
but this logically affects child pages as well.
Is this possible to redirect only the base URL page? I don’t want to disrupt the existing software that displays some dynamic content on the base URL page, so I just want to direct away from it automatically as I don’t want the users to ever see that page.
I didn’t see my exact question anywhere else here, so I hope someone can direct me. Thanks!
Try adding the following to your htaccess file in the root folder of your domain.
If the URL you want to redirect is http://mydomain.com/some-folder/to-redirect.php then the rule would be
EDIT
Add the following to your .htaccess file in the root directory of
mydomain.com