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!

htaccess help

Discussion in 'General Discussion' started by loccom, Dec 12, 2017.

  1. loccom

    loccom Member

    Joined:
    Aug 3, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    Hi Guys

    Got an issue. Since upgrading one of my sites to https the htaccess has now messed up the links and gives 404's I am not sure where to change. Can someone please advise how i can change it please. Below are the rewrites for seo friendly urls. How can i implement these as https?


    RewriteRule ^parts-categories/(.*)$ %{REQUEST_URI}/car-parts-categories.php?model=$1 [P,NC,L]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule ^parts-results/(.*)/(.*)/(.*)$ %{REQUEST_URI}/car-parts-results.php?model=$1&catname=$2&catid=$3 [P,NC,L]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule ^parts-search-results/(.*)/(.*)/(.*)/(.*)$ %{REQUEST_URI}/car-parts-search-results.php?model=$1&catname=$2&catid=$3&query=$4 [P,NC,L]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule . index.php [L]



    thanks
     
  2. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    254
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    Is this your entire htacess? Can you please show everything pertaining to rewrite rules?

    normally you need turn it on.

    Also what code did you try to use to make the site force https
     
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Do you use EasyApache 4 on this system? If so, check to ensure the "Use a Global DCV Passthrough instead of .htaccess modification (requires EA4)" option is enabled under the "Domains" tab in "WHM >> Tweak Settings". Once it's enabled, you can remove the DCV entries in the .htaccess file to rule them out as the cause of the issue.

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

    loccom Member

    Joined:
    Aug 3, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    I did this in tweak settings and i had the

    No input file specified.

    This seems to only be on all Addon domains.

    Tried to restart httpd and got

    Cpanel::Exception::Timeout/(XID v8uaqe) The system failed to lock the file “/etc/apache2/conf/httpd.conf” after 60 seconds. at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 336. Cpanel::Exception::create("Timeout", "The system failed to lock the file \x{e2}\x{80}\x{9c}[_1]\x{e2}\x{80}\x{9d} after [quant,_2"..., ARRAY(0x23fe410)) called at /usr/local/cpanel/Cpanel/Exception.pm line 46 Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__..., ARRAY(0x23fe410)) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 710 Cpanel::SafeFile::_timeout_exception("/etc/apache2/conf/httpd.conf", 60) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 599 Cpanel::SafeFile::_do_flock_or_return_exception(GLOB(0x832b28), "/etc/apache2/conf/httpd.conf") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 540 Cpanel::SafeFile::_safe_open(GLOB(0x832b28), "<", "/etc/apache2/conf/httpd.conf", CODE(0x8613e8), "safeopen") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 107 Cpanel::SafeFile::safeopen(GLOB(0x832b28), "<", "/etc/apache2/conf/httpd.conf") called at /usr/local/cpanel/Cpanel/HttpUtils/ApRestart.pm line 107 Cpanel::HttpUtils::ApRestart::safeaprestart(1) called at bin/safeapacherestart.pl line 27
     
    #4 loccom, Dec 13, 2017
    Last edited by a moderator: Dec 13, 2017
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
    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