Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 23rd, 2009, 11:20 PM
fazexx's Avatar
fazexx fazexx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2009
Location: Eastern Shore Maryland, USA
Posts: 269 fazexx Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 12 h 7 m 42 sec
Reputation Power: 0
Send a message via AIM to fazexx Send a message via MSN to fazexx Send a message via Yahoo to fazexx Send a message via Google Talk to fazexx Send a message via Skype to fazexx Send a message via XFire to fazexx
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?

Reply With Quote
  #2  
Old June 24th, 2009, 02:16 PM
SteffenL SteffenL is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 76 SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 12 h 35 m 35 sec
Reputation Power: 110
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?
Comments on this post
holodoc agrees: I didn't meant to say that your solution is bad

Reply With Quote
  #3  
Old June 24th, 2009, 03:45 PM
holodoc's Avatar
holodoc holodoc is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: Kostolac, Serbia
Posts: 663 holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 15 h 35 m 6 sec
Reputation Power: 980
Send a message via Google Talk to holodoc Send a message via Skype to holodoc
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:
<?php 
abstract class Ignorance extends Stupidity implements Unavoidable 
     public static 
$humiliation

     final function 
findCover(); 

?>

Reply With Quote
  #4  
Old June 24th, 2009, 04:02 PM
SteffenL SteffenL is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 76 SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 12 h 35 m 35 sec
Reputation Power: 110
holodoc: Thank you very much for pointing that out.
fazexx: I am sorry for giving you a solution you cannot use after all.

Reply With Quote
  #5  
Old June 24th, 2009, 04:06 PM
holodoc's Avatar
holodoc holodoc is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: Kostolac, Serbia
Posts: 663 holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level)holodoc User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 15 h 35 m 6 sec
Reputation Power: 980
Send a message via Google Talk to holodoc Send a message via Skype to holodoc
Quote:
Originally Posted by SteffenL
holodoc: Thank you very much for pointing that out.
fazexx: I am sorry for giving you a solution you cannot use after all.
No you don't have to apologize for my remark It's a valid solution but cPanel often doesn't like when people manually tamper with folder .htaccess files
Comments on this post
SteffenL agrees: Thank you very much

Reply With Quote
  #6  
Old June 24th, 2009, 05:04 PM
SteffenL SteffenL is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 76 SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level)SteffenL User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 12 h 35 m 35 sec
Reputation Power: 110
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > general - Redirect Question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
Stay green...Green IT