Avoiding permalink issues when running WHMCS in a subdirectory of WordPress

When WHMCS is installed in a subdirectory of WordPress and you want to activate knowledgebase, announcements and/or downloads pretty permalinks, you need to make sure the .htaccess of WHMCS doesn't conflict with the .htaccess of WordPress.

Assuming that WHMCS is installed in a folder called whmcs, then update the .htaccess file in the whmcs subdirectory as follows (changes are in bold green).

RewriteEngine On
RewriteBase /whmcs

# Announcements
RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC]RewriteRule ^announcements$ ./announcements.php [L,NC]
# Downloads
RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC]RewriteRule ^downloads$ ./downloads.php [L,NC]
# Knowledgebase
RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ ./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]
  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

I have trouble with the formatting when viewing an invoice or a quote

You probably have the bridge helper addon for WHMCS installed and pages are redirecting to your...

"Login as Client" and bridge redirect

Note that when you "login as client" from the WHMCS back-end you will not be redirected to your...

The encoded file **** is corrupt.

This error typically occurs when you used FTP to transfer to software to your software but used...

What about support and other emails? How do I get these to blend in with my WordPress site?

To make sure that your support, billing and other emails direct the customer to your WordPress...

I have a blank page displaying!

1. It could be a theme issue. Verify that in your theme's header.php file, you see the...