The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect URL

Discussion in 'General Discussion' started by mickalo, Oct 26, 2007.

  1. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    Hello,

    I have a custom who was using a url to a remote order form located on a different server. Now they want to setup this order form on their site as the remote service is no longer available. Is there way to do this as a redirect or mod rewrite ??

    Basically what we have is this, a link on 100 of pages that link to the remotedomain. so when someone clicks on this link, it will redirect them to a localdomain url:

    Code:
    REMOTEURL: https://www.remotedomain.com/order_form.html -> 
    REDIRECTURL-TO :https://www.localdomain.com/order_form.html 
    
    can this done with a mod rewrite rule or some type of .htaccess redirect?

    Thx's
    Mickalo
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    It's possible to rewrite urls, and generally play around with urls, for requests coming in to your server as you have control over Apache and so you can tell Apache to behave however you like for whatever request you like.

    For anything else - no chance. You have no control over this as it will be the end user's browser requesting the resource from the remote machine and your server will have nothing to do with it, beyond sending the html pages to the end user's browser in the first place.

    If a customer web site has http://remote.example.com/form.cgi present as a url and you want this instead to go to http://local.example.com/form.cgi, you will need to change the urls in the customer pages in some way.

    If the content is static, you can do things manually or with a global search and replace. If the content is dynamic, you may have to modify the content management system, either by reconfiguring or recoding, to get the result you need.

    Either way, you're going to have to do something that changes the urls in the web pages and you can't merely get the urls to automatically go elsewhere, unless they are changed before being served to the end user's browser.
     
Loading...

Share This Page