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 multiple

Discussion in 'General Discussion' started by beastor, Nov 5, 2007.

  1. beastor

    beastor Registered

    Joined:
    Nov 5, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    The user manual says ...
    2. There will be two empty text boxes on the page. The first text box is following the root path of your current domain. Enter the path to the file you want to redirect in the first empty text box.

    Example: http://DomainA.com/Sales.HTML (Just enter Sales.HTML or the directory and filename you are redirecting.)

    Enter the domain name and path or url you want your visitor to be redirected to in the second empty text box.

    Example: http://DomainB.Com/Order.HTML (Just enter the domain name and directory/filename of the new location.)

    3. Click on the "Add" button

    Ok now, we have a direstory that is /old/ It used to have 50 html pages in it
    How do I redirect all 50 pages that were in old to another location without doing 50 redirects ? Is there a wildcard for this?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Are you looking to redirect the entire contents of a directory or only specific files within the directory?

    If you are redirecting an entire directory and are using cPanel 11 with the X3 theme, there is a checkbox labeled Wild Card Redirect. If you check that and only enter in the name of a directory, all the requests to that directory will be redirected to the new directory. For example, forwarding http://domain1.com/dave to http://domain2.com/bob with the wild card redirect will forward http://domain11.com/dave/Order.HTML to http://domain2.com/bob/Order.HTML and so forth.
     
  3. beastor

    beastor Registered

    Joined:
    Nov 5, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    The version is 11.15.0-CURRENT 17853 Theme cPanel X v2.6.0

    There does not appear to be a check box.


    Let me draw it for you. http://www.bob.com/old/ had 8 directories in it. each directory contained 50 html pages and 50 images.
    The search engines are still supplying links to the contents of the 8 folders inside old.
    I want to capture any call to anything that used to be contained in the /old/ directory and send it to /new/menu.html

    There has to be something like redirect http://www.bob.com/old/*.* to http://www.bob.com/new/menu.html
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Use the X3 theme instead. The X and X2 themes were not designed with cPanel 11 in mind and will likely become fully deprecated in version 12.

    If I was setting up the wildcard redirection, I would redirect from http://www.bob.com/old to http://www.bob.com/new/menu.html? (note the question mark) this way any path information from the precise file requested gets absorbed into a GET parameter to that HTML file (essentially becomes discarded as long as it's a static HTML page).
     
  5. beastor

    beastor Registered

    Joined:
    Nov 5, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I don't have the upgrade option. I am only renting part of a server.
    Does the *.* actually work ?

    File does not exist: /public_html/old/tushy/005/IMG_1811.html
    File does not exist: /public_html/old/tushy/001/Img-020.html
     
    #5 beastor, Nov 5, 2007
    Last edited: Nov 5, 2007
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Do not use *.* - that is a Windows wildcard that will not work on a Linux/FreeBSD server :).
     
  7. beastor

    beastor Registered

    Joined:
    Nov 5, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for you time. I just opted for a simpler solution. I just rebuilt my 404 page.
     
Loading...

Share This Page