PDS Posted July 21, 2011 Share Posted July 21, 2011 My WHMCS is in a directory named support. I have the following in my public_html htaccess and the site is working without errors, everything is as expected: Options +FollowSymlinks RewriteEngine On RewriteBase / #Not show php ext RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php #Change to the preferred domain RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] #Rewrite the URL for WHMCS to always use https except for the whmcs/dl.php file RewriteCond %{REQUEST_URI} !^/support/dl.php [NC] RewriteCond %{REQUEST_URI} ^/support/ [NC] RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L] #Rewrite the URL for WHMCS dl area to always use http RewriteCond %{REQUEST_URI} ^/support/dl.php [NC] RewriteCond %{SERVER_PORT} !^80$ RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] When I enable the below support directory htaccess to use KB it works but all rewrites fail, i.e I can use domain with WWW and navigate WHMCS using http and the WHMCS branding appears on the page. # Knowledgebase RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.php$ knowledgebase.php?action=displayarticle&id=$1 [L,NC] RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ knowledgebase.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^knowledgebase$ knowledgebase.php [L,NC] I've asked support but they don't appear to know why. I've tried commenting out RewriteBase / and Options +FollowSymlinks but still same problem. SEF is ticked to use in admin The server error log is: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: https://domain.com/support/knowledgebase.php Which is an htaccess loop caused by adding the KB rule Can anyone help me resolve this please? 0 Quote Link to comment Share on other sites More sharing options...
PDS Posted July 22, 2011 Author Share Posted July 22, 2011 Fixed having spent days on this. The instructions I read said WHMCS rewrites have to be in web root. I've added them to the WHMCS subdirectory htaccess with knowledgebase, announcements and downloads directives and amended path. Works flawlessly now. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.