|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
general - Redirect Question
I think this is the right forum, if not, I'm sorry.
In a CPanel x3 environment, how would I redirect domain.com/* to otherdomain.com/*? For example, I want domain.com/somefolder to redirect to otherdomain.com/somefolder. Somefolder being any appended path, but the redirect needs to keep that path. Is this possible? |
|
#2
|
|||
|
|||
|
You should be able to do that pretty easily with a .htaccess file and the following code:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$
RewriteRule (.*) http://otherdomain.com/$1 [R=301,L]
Permanently redirects from domain.com to otherdomain.com. The path remains intact as well. Is this what you are looking for? ![]() |
|
#3
|
||||
|
||||
|
That would be a proper way of making a redirection to another domain with Apache but I fear that it might create some issues with cPanel itself.
As for the OP's problem under cPanel you will find a menu called "Redirects" where you will simply follow these instructions to create a redirection.
__________________
PHP Code:
|
|
#4
|
|||
|
|||
|
holodoc: Thank you very much for pointing that out.
fazexx: I am sorry for giving you a solution you cannot use after all. |
|
#5
|
||||
|
||||
|
Quote:
It's a valid solution but cPanel often doesn't like when people manually tamper with folder .htaccess files ![]() |
|
#6
|
|||
|
|||
|
I just thought that I could have searched more on redirection with cPanel, since that is what fazexx originally asked for, so that I could have given a better answer than the one I gave, and... So.. I mean.. Yeah...
Thank you, holodec. ![]() |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > general - Redirect Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|