Skip to main content

Redirects from htaccess shown in cPanel?

Comments

5 comments

  • vanessa
    cPanel reads the redirects from .htaccess and shows them in the panel. Similarly, when you create the redirects in cPanel, cPanel just writes them to .htaccess. This is normal behaviour.
    0
  • markus909
    Thanks - that's good to know. So it's basically a bidirectional sync. Do you know of any documentation about this? I can imagine only specific redirects can be read. There are endless of ways to write redirection rules within .htaccess I doubt cPanel can all read/translate them. Probably only the "simple" redirects will be read out, e.g. Redirect 301 /oldpage /newpage
    0
  • cPRex Jurassic Moderator
    Hey there! Yes, cPanel will read the .htaccess file and add anything to that page, so what you're seeing is normal.
    0
  • vanessa
    Other than the official documentation for redirects from cPanel, its not specifically mentioned. I believe this falls into the "common sense" category considering that in Apache systems, that's one of the only ways to create a redirect other than adding header redirects directly in code. Honestly, I'm not sure what your end goal is. I'm sure there are some manual redirects that you add in .htaccess that cPanel probably can't read, but I'm sure it just checks for the "Redirect 30X" indicator in .htaccess and parses accordingly. Additionally, if you add manual redirects to .htaccess that cPanel happens to not be able to read, they will work anyway. I don't know that there is any documentation on what redirects cPanel can parse, because I mean, who cares?
    0
  • markus909
    Other than the official documentation for redirects from cPanel, its not specifically mentioned. I believe this falls into the "common sense" category considering that in Apache systems, that's one of the only ways to create a redirect other than adding header redirects directly in code. Honestly, I'm not sure what your end goal is. I'm sure there are some manual redirects that you add in .htaccess that cPanel probably can't read, but I'm sure it just checks for the "Redirect 30X" indicator in .htaccess and parses accordingly. Additionally, if you add manual redirects to .htaccess that cPanel happens to not be able to read, they will work anyway. I don't know that there is any documentation on what redirects cPanel can parse, because I mean, who cares?

    It's just easier when troubleshooting to understand how a system works. I prefer to understand what's going on under the hood when I enter things into cPanel
    0

Please sign in to leave a comment.