Jump to content

Fully Friendly URLs not working with openlitespeed


Recommended Posts

Hi there, 

I switch from apache to openlitespeed, the problem is the Fully Friendly URLs inside the admin panel are not working correctly (any url inside the admin panel works), i.e:

- domain.tld/whmcs/admin/setup (not working)

The sign-in integrations are not working too

The user notes loaded using the "modal" are not being saved too. 

The only way to get this working is change to "friendly index.php" option. 


Changing to apache or nginx all works fine, anyone know how can solve this issue and get Fully Fiendly URLs working with openlitespeed? 

 

Thank you in advance.

Link to comment
Share on other sites

  • WHMCS Technical Analyst

According to an OpenLiteSpeed support forum post:

Quote

OLS does not have full .htaccess functionality ...

Therefore, you may need to work with your system administrator to adapt your .htaccess to work with OpenLiteSpeed.

Additionally, there are also further references to this that you may find helpful at
https://forum.openlitespeed.org/threads/apache-htaccess-to-ols-migration.5276/

Link to comment
Share on other sites

 

 

Hi, thank you for your answers, 

 

Quote

It seems you have incorrect rewrite rules in your htaccess, you said its working fine with Nginx but Nginx rules doesn't work with LiteSpeed.

I mean what with the rules for nginx, whmcs works fine on the nginx server.

But I haven't found any rules specifically for OpenLiteSpeed.

Quote

Please verify that you are using correct rules or you may try by using WHMCS Default htaccess rules

Yes, I'm using the default htaccess rules

Quote

Therefore, you may need to work with your system administrator to adapt your .htaccess to work with OpenLiteSpeed.
 

I've been trying to adapt those htaccess rules for 48 hours and I haven't been able to, that's why I decided to ask here just in case someone who already uses OpenLiteSpeed with WHMCS could help me.

 

Link to comment
Share on other sites

On 7/17/2022 at 10:37 PM, GoogieHost said:

We are using OLS with DirectAdmin but haven't faced such issues 

Hi, thank you for answer...  Do you have perform any custom config to htaccess? We are using OLS with CyberPanel.

I have added a "context" with following values:

Quote

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:


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]

But can't get the fully friendly URL working 😞
 

Captura de Pantalla 2022-07-20 a la(s) 12.15.30.png

Link to comment
Share on other sites

1 hour ago, Alliance said:

Hi, thank you for answer...  Do you have perform any custom config to htaccess? We are using OLS with CyberPanel.

I have added a "context" with following values:

But can't get the fully friendly URL working 😞
 

You can talk to Usman (CyberPanel Developer) because it still have bugs htaccess looks fine for me.

Link to comment
Share on other sites

In your cyberpanel, > Configurations > Rewrite rules

I think you can configure rewrite rules like this


### 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 ###

 

Edited by altomarketing
mistake
Link to comment
Share on other sites

10 hours ago, altomarketing said:

In your cyberpanel, > Configurations > Rewrite rules

I think you can configure rewrite rules like this



### 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 ###

 

Hi,  thank you for your cooperation but the result is the same. 

Link to comment
Share on other sites

  • 10 months later...

Hola,

Me enfrente al mismo error 404 en el la URL setup del WHMCS.

Me di cuenta que el problema proviene del archivo .htacces que protégé 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 en 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]
 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated