I recently switch to cyberpanel, I’m using WHMCS software, the problem is the Fully Friendly URLs inside the admin panel are not working correctly (any url inside the admin panel works), i.e:
I have added a “context” with the following values:
URI: /clients/
Location: /home/alliance/public_html/clients
Accesible: Yes
Enable Expires: Not Set
Auto Index: Not Set
Enable Rewrite: Yes
Rewrite Inherit: Not Set
Rewrite Base:
Rewrite Rules:
Went to install whmcs, a nulled version just to test.
I installed it on a folder called “teste”, which for this example is the equivalent to your “whmcs” folder.
Default with friendly URLs set up to “index.php”.
The only steps I did were:
1 - Setup database for WHMCS
2 - Run the WHMCS installer
3 - Login WHMCS admin, configurations, change from friendly index.php to full friendly rewrite
4 - Run this command “service openlitespeed restart” at the vps
The last step it’s because the .htaccess may take some time to be updated (3 minutes if I recall correctly), as it runs on a cronjob. Restarting it manually makes sure that it reads the changes.
Perhaps this last step was what was happening?
I did not edit any htaccess rules inside the OLS panel so it confirms those aren’t needed.
I read your original thread at the whmcs forum, and what “WHMCS ANWAR” quoted you, was a post from 2017, at that time indeed OLS didn’t have 1:1 htaccess functionality, but now it should all work fine.
If you still have the same issue, send me a message with your anydesk so I can take a look at it.
Me enfrente al mismo error 404 en el la URL setup del WHMCS.
Me di cuenta que el problema proviene del archivo .htacces que protege el directorio del admin del whmcs, lo adecue o modifique para que funcione con OLS y ha vuelto a cargar las URL amigables sin problemas. Ya no muestran el error 404.
RewriteEngine On
RewriteBase /admin/
# Permitir el acceso a los recursos necesarios para WHMCS
RewriteRule ^whmcs/(.*)$ - [L]
# Reglas de reescritura de URL de WHMCS
RewriteRule ^client/([^/]+)/?$ clientarea.php?rp=$1 [L,QSA]
RewriteRule ^order/?$ cart.php?a=add [L,QSA]
# Reglas de autenticación básica
AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /home/xxxx/domains/xxxxt/.htpasswd/public_html/admin/.htpasswd
AuthName "whmcs"
require valid-user
ErrorDocument 401 "Unauthorized Access"
# Resto de las reglas de reescritura de WHMCS
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
Manually test it or Use browser developer tools to inspect network requests and redirects or use this tool https://Redirectchecker.com/ This can help you identify where the redirection is happening and potentially trace it back to the source.
Hello, finally solve the issue, I have renamed the .htaccess file provided by whmcs and from the whmcs admin panel generate a new .htaccess file… and its working now.
I have double check both htaccess (the renamed and the new) and both have the same configuration so I can’t tell exactly what the problem was, I want to thank everyone who took the time to help me, have a nice day!