Skip to main content
cPanel Technical Support has been heavily impacted by hurricane Beryl and our ability to respond to tickets has been hindered as a result. We appreciate your understanding and patience as we address these delays.

Strange redirect (regular expression), and rewriteoptions inherit, in .htaccess

Comments

5 comments

  • cPRex Jurassic Moderator

    Hey there!  That interface is able to pull data directly from the .htaccess file - that means that even though you may not be able to do something inside cPanel, it will show up there if it reads it from the file.

    Are there other .htaccess files on the account besides the main /home/username/public_html?  Each directory can have one, so it could be anywhere.

     

    0
  • PeteS

    Pulling from .htaccess...Is that a new thing? I often add things manually and don't remember ever seeing that happen. So the interface tries to pull data from all/any .htaccess files in the account?

    This account has many addon domains, all at the same level as public_html though. I do know there can be many .htaccess files. :) But this is an "ALL" redirect, and that seems like it would have to be applied somewhere else... where?

    How would that account for the redirect being listed as as 302, yet permanent?

    So is regex only in the interface to accommodate regex pulled from the file, yet can't be added via the interface? (The docs were oddly silent about this.)

    And could this be related to many (not all) .htaccess files having "rewriteoptions inherit" in them (even if there are no .htaccess files above them)? It there any process in cPanel that would add that? I know for sure they were not manually added.

    0
  • cPRex Jurassic Moderator

    Pulling from .htaccess directly is how the interface has always been as long as I can recall.  Since there are different domains mentioned on the left side that would indicate it's pulling from multiple sources as well.

    I don't have a good explanation for the "ALL" redirect so we may need to see a ticket on this if you can't determine where that is coming from.

    0
  • PeteS

    I'm sure I can find the .htaccess file this was pulled from. I'll get back after that if there are concerns. I'm pretty sure I know which software installed the rule in its .htaccess file.

    I'm also wondering if it's responsible for the "RewriteOptions inherit" in all the top level .htaccess files in the account (for addon domains). Putting it in a top level file makes no sense to me, so I might need to ask the dev on it. The software is only installed for one domain; a subdomain of the domain in public_html. (All addons/subdomains are in a folder beside public_html.) But can you check with your devs to see if there is a circumstance where cPanel would add that?

    I'd like to get a link(s) to docs regarding regex in redirects. How would one do that *in* cPanel (or is is only there to accommodate regex if pulling in from an .htaccess file)?

    Also, docs on where a redirect is stored when an "ALL" redirect is created from within cPanel would be helpful.

    Thanks!

    0
  • cPRex Jurassic Moderator

    I don't think we have any docs that are that specific.  We'd likely need to examine your situation to see what exactly is going on, and then if we find something odd we could update or add to existing documentation from there.

    0

Please sign in to leave a comment.