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!

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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,435
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,774
    Likes Received:
    93
    Trophy Points:
    353
    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]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #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:
    16,571
    Likes Received:
    439
    Trophy Points:
    583
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    16,571
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    No. That appears to be root level of your cPanel account.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    16,571
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Good luck.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    16,571
    Likes Received:
    439
    Trophy Points:
    583
    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.. ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    16,571
    Likes Received:
    439
    Trophy Points:
    583
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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