Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Redirect all files in a directory

Discussion in 'General Discussion' started by Kerrya, Dec 15, 2014.

  1. Kerrya

    Kerrya Registered

    Jul 27, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Reseller Owner
    I'm having a problem with 301 redirects.

    I have a sub-directory that contains a forum that is no longer used. I want to redirect all hits on that directory back to the main root of the site.

    i.e. >

    this only seems to work on the directory but not on the files in the directory.

    i.e. does not redirect at all. It still goes to the original file

    If I use a wildcard redirect then this happens: >

    Is there a way to redirect all links to that directory regardless of what file is specified?

    Any advice appreciated.

  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will likely need to implement some custom Mod_Rewrite rules in order to redirect those requests. You may want to post to the support forums of the previous script you were using to see what type of rules others might have utilized.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice