How can I redirect the main homepage and other subpages seperately?
I want to redirect my main homepage to redirect (e.g. example.com) to a seperate website but also redirect other subpages (e.g. example.com/contact) to a seperate website as well. But when I redirect my main page it doesn't allow the other subpages to be redirected.
Example:
example.com ---> example.org
example.com/contact ---> example.org/contact
I use UkCheapHosts to host my website and configure using cPanel. How can this work?
If I put a redirect onto example.com to redirect to example.org it works fine, but when I add another redirect from example.com/contact to example.org/contact, it doesn't work........
Help is much appreciated.
-
It sounds like what you want is a wildcard redirect. You can select the checkbox at cPanel>>Domains>>Redirects when creating the redirect. 0 -
It sounds like what you want is a wildcard redirect. You can select the checkbox at cPanel>>Domains>>Redirects when creating the redirect.
Hi Lauren - Sorry, this hasn't worked, I have tried a wildcard on the main page as well as on the other page and when I run the address, I get "Error establishing a database connection" - there's got to be a way to do it....hasn't there? Oliver0 -
That specific error doesn't sound related to a redirect it sounds specific to the database. The redirect only controls *where* you go it does not have anything to do with the DB status. 0 -
That specific error doesn't sound related to a redirect it sounds specific to the database. The redirect only controls *where* you go it does not have anything to do with the DB status.
HI again Lauren - if you know how to solve my issue, please could you write out a couple of steps I can take to get al redirects working - I really need this fixed.....0 -
Hello, Again, based on the information you've provided I it sounds as though the issue is actually your connection to the database, not the redirect. If you can confirm that the site goes from originalsite.tld/contact -> newsite.tld/contact with the wildcard enabled that is functioning. As for the error on newsite.tld I have literally 0 information on this error provided by you so far so I am unsure how I would have provided you information on its resolution. Most commonly this is an incorrect db password in the CMS's configuration script for the database. But you may want to contact your provider in the event that you are either not using a CMS or you've confirmed that the password for the one you're using is correct. 0 -
with the wildcard enabled
Which one should have the wildcard enabled? The main homepage or /contact?Hello, Again, based on the information you've provided I it sounds as though the issue is actually your connection to the database, not the redirect. If you can confirm that the site goes from originalsite.tld/contact -> newsite.tld/contact with the wildcard enabled that is functioning. As for the error on newsite.tld I have literally 0 information on this error provided by you so far so I am unsure how I would have provided you information on its resolution. Most commonly this is an incorrect db password in the CMS's configuration script for the database. But you may want to contact your provider in the event that you are either not using a CMS or you've confirmed that the password for the one you're using is correct.
The Error establishing a database connection message appears when I go to www.example.com/contact. How could I go about sorting this? - What would you suggest I do?0 -
It's no different than what I suggested previously, as far as troubleshooting the db error. If what you're saying is your issue is that www.example.com/contact isn't redirecting you missed the checkbox in the redirect that indicates "Redirect with or without www" and it should be added with that. 0 -
It's no different than what I suggested previously, as far as troubleshooting the db error. If what you're saying is your issue is that
No - it doesn't work with either and with or without is checked0 -
Hello @ORICKETTS It sounds as though the database issue is altogether separate from your initial question about URL redirects. I understand that you are attempting to set up these redirects: 1. example.com ---> example.org 2. example.com/contact ---> example.org/contact You've relayed that number 1 works, but number 2 does not work. What is the result when you visit example.com/contact after you've attempted to enable redirection number 2? Does your browser load example.com/contact and give no signs of redirecting? 0 -
Hello @ORICKETTS It sounds as though the database issue is altogether separate from your initial question about URL redirects. I understand that you are attempting to set up these redirects: 1. example.com ---> example.org 2. example.com/contact ---> example.org/contact You've relayed that number 1 works, but number 2 does not work. What is the result when you visit example.com/contact after you've attempted to enable redirection number 2? Does your browser load example.com/contact and give no signs of redirecting?
Hi Samuel - when I visit example.com/contact, it loads and gives no sign of redirecting. Thanks0 -
Hello @ORICKETTS Thank you for replying. Would it be possible for you to share a screenshot of the Redirects page from the cPanel account? This will give us a better idea of how the redirects are currently configured. Please make sure to exclude any identifying information such as your server's hostname or IP address, as well as the cPanel user name and domain name. 0 -
Hello @ORICKETTS Thank you for replying. Would it be possible for you to share a screenshot of the Redirects page from the cPanel account? This will give us a better idea of how the redirects are currently configured. Please make sure to exclude any identifying information such as your server's hostname or IP address, as well as the cPanel user name and domain name.
Thanks @cPSamuel - I've contacted my domain provider and they sorted it :)0 -
I want to redirect my main homepage to redirect (e.g. example.com) to a seperate website but also redirect other subpages (e.g. example.com/contact) to a seperate website as well. But when I redirect my main page it doesn't allow the other subpages to be redirected. Example: example.com ---> example.org example.com/contact ---> example.org/contact I use UkCheapHosts to host my website and configure using cPanel. How can this work? If I put a redirect onto example.com to redirect to example.org it works fine, but when I add another redirect from example.com/contact to example.org/contact, it doesn't work........ Help is much appreciated.
@ALL - Question Solved0 -
Hello @ORICKETTS That's great, I'm glad to hear the problem is solved. I will go ahead and mark this forum thread as Solved. Thank you, 0
Please sign in to leave a comment.
Comments
14 comments