DennisHermannsen Posted August 29, 2018 Share Posted August 29, 2018 Hi! I'm having some trouble getting rewrites working in WHMCS. We've installed WHMCS in /client. The root is just a WordPress installation. Content of WHMCS .htaccess: ### BEGIN - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ### <IfModule mod_rewrite.c> RewriteEngine on # RewriteBase is set to "/" so rules do not need updating if the # installation directory is relocated. It is imperative that # there is also a RewriteCond rule later that can effectively get # the actual value by comparison against the request URI. # # If there are _any_ other RewriteBase directives in this file, # the last entry will take precedence! RewriteBase / # Redirect directories to an address with slash RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] # Send all remaining (routable paths) through index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Determine and use the actual base RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$ RewriteRule ^.*$ %2index.php [QSA,L] </IfModule> ### END - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ### RewriteRule ^client/file client/file.php [NC] RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php [NC,L] I've tried in so many ways to have the .php extension removed from a custom file located in /client/file.php, but with no luck. Another weird thing is that we need to access https://domain.tld/client/admin/ - if we leave out the last forward slash, we're getting a 404 page. Any ideas? Could the WordPress config installed in the root mess with this? 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.