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.

Everything to https:// with "www."

Discussion in 'Security' started by Ben Horle, Dec 21, 2015.

  1. Ben Horle

    Ben Horle Member

    Joined:
    Dec 21, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    uk
    cPanel Access Level:
    Website Owner
    Hi all

    I've tried to add custom Mod_Rewrite rules, how ever when I add in to the top of the file I get a 500 error. can anyone help me?

    [Removed - Real Domain Names]
     
    #1 Ben Horle, Dec 21, 2015
    Last edited by a moderator: Dec 21, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you let us know the output to /usr/local/apache/logs/error_log when you notice the "500" error code in your browser?

    Thank you.
     
  3. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Not knowing your error output but this works for us
    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
    RewriteRule ^ [URL]http://www.%{HTTP_HOST}%{REQUEST_URI}[/URL] [R=301,L]
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ [URL]https://www.domain.com/$1[/URL] [R=301,L]
     
    #3 dalem, Dec 21, 2015
    Last edited by a moderator: Dec 22, 2015
  4. Ben Horle

    Ben Horle Member

    Joined:
    Dec 21, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    uk
    cPanel Access Level:
    Website Owner
    Thank you for the quick response, I am currently trying to find this file and will let you know the contents of this file when I find it.

    Thanks again for your help.

    Ben
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Your forum profile has you listed as Website Owner. You wouldn't have access to that file without root access to the server.
     
  6. Ben Horle

    Ben Horle Member

    Joined:
    Dec 21, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    uk
    cPanel Access Level:
    Website Owner
    Hi

    Is this the root folder please?
     

    Attached Files:

  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    No. That appears to be root level of your cPanel account.
     
  8. Ben Horle

    Ben Horle Member

    Joined:
    Dec 21, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    uk
    cPanel Access Level:
    Website Owner
    Ok thank you,
    I have raised a ticket with my hosting provider and will be in contact as soon as I have the details.

    Thank you so much for your help, I really appreciate it.

    Ben
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  10. Ben Horle

    Ben Horle Member

    Joined:
    Dec 21, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    uk
    cPanel Access Level:
    Website Owner
    Hi They came back with this

    Not sure a pdfr would stop my redirect
     
    #10 Ben Horle, Dec 23, 2015
    Last edited by a moderator: Dec 23, 2015
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Did you attempt to create an error in the log first before having him check? Did you tell him what the actual error was so he could check the server's error log file cPanelMichael mentioned?
    Tell them that.. ;)
     
  12. Ben Horle

    Ben Horle Member

    Joined:
    Dec 21, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    uk
    cPanel Access Level:
    Website Owner
    Hi Thanks

    He came back with this:


    - Removed -
     
    #12 Ben Horle, Dec 23, 2015
    Last edited by a moderator: Dec 23, 2015
  13. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I've removed all that output. Please don't post it without removing your actual domain, website, IPs, emails and anything else thats personally identifiable like that.

    I took a look at those errors, this isn't a cPanel issue you're having. The problem seems to be with your wordpress site and how you're managing your redirects. There's got to be plenty of wordpress conversations about this over at wordpress. Here's an example:
    Changing The Site URL « WordPress Codex
     
Loading...

Share This Page