htaccess help
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
-
Is this your entire htacess? Can you please show everything pertaining to rewrite rules? normally you need turn it on. RewriteEngine On
Also what code did you try to use to make the site force https0 -
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. 0 -
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.
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 270 -
Hello, Could you open a support ticket using the link in my signature so we can take a closer look? Thank you. 0 -
Hello, I am new in htaccess i want to know, how to redirect on same page pass parameter or without parameter using htaccess exmple without parameter 0 -
Hello, I am new in htaccess i want to know, how to redirect on same page pass parameter or without parameter using htaccess exmple without parameter
Hi, I believe there are some ways to do it. But basically you can do this: RewriteEngine On RewriteRule ^ blogs /? $ /blogs.php [NC, L] RewriteRule ^ blogs / ([a-z0-9 -] +) /? $ / blogs.php?id=$1 [NC] But don't just do it like the example above. Try to understand what is being done. So I recommend reading and also researching a little more about:0
Please sign in to leave a comment.
Comments
6 comments