Hello everyone, I am seeing a 404 error for the website

aboyit

New Member
#1
I have doamin.com/web/1a
Website belongs to CMS Wordpress
The homepage of web domain.com/web/1a and the admin domain domain.com/web/1a/wp-admin still works, but my articles, products, and subpages have 404 errors. I have to reboot again. vps then everything works properly. However, I often create many websites of this type, so restarting vps is not possible, someone can help me solve this error. Vps I'm running Centos 7 - CURRENT VERSION:
OpenLiteSpeed (DirectAdmin Edition) 1.7.2. Thank you .
 

Cold-Egg

Administrator
#2
Hi,

Reboot server is not a work around method. If it happens again, could you try to restart the web service only see if it helps?
Code:
systemctl restart lsws
 

aboyit

New Member
#3
Hi,

Reboot server is not a work around method. If it happens again, could you try to restart the web service only see if it helps?
Code:
systemctl restart lsws
I tried this command, but once it did not work then I went to wp-admin to save the "static path" once and ran the above command again, it worked. But I am doing the auto-install feature of trial web when I was sure that I had chosen a template, everything happened automatically, I could not repeat the steps above in the self-installed guest demos, do you have a better or automatic solution, please guide me, thank you very much. .
 

Cold-Egg

Administrator
#4
Hi,

Could you clarify what does "static path" means in WordPress? You shouldn't have this kind of manual steps, so there must something wrong in this environment. Could you share the htaccess file?
Any link you can share regards to the "auto-install feature of trial web when I was sure that I had chosen a template" ?
 

aboyit

New Member
#5
Hi,

Could you clarify what does "static path" means in WordPress? You shouldn't have this kind of manual steps, so there must something wrong in this environment. Could you share the htaccess file?
Any link you can share regards to the "auto-install feature of trial web when I was sure that I had chosen a template" ?
Hi , "static path" ==
1593737978731.png


File .htaccess
1593738058376.png

I send you the static link and the content of the .htaccess file of the web with the link.
https://webnew.info/web/3a
Thank you, you can take a look through it for me.
 

Cold-Egg

Administrator
#6
Hi,

So, if you update any permalink, please do restart the web server and purge the cache.
About htaccess file, web server will treat L tag as Last rule and exit, so please try changing your [R=301,L] to [R=301] only and restart web server. Let us know if it works.
 

aboyit

New Member
#7
Hi,

So, if you update any permalink, please do restart the web server and purge the cache.
About htaccess file, web server will treat L tag as Last rule and exit, so please try changing your [R=301,L] to [R=301] only and restart web server. Let us know if it works.
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301]
I changed it and rebooted and it still has 404 child pages.
https://webnew.info/web/3a/san-pham/o-tu-dong-thoi-trang-cham-bi-tre-trung-cho-ban-gai
 

aboyit

New Member
#11
OLS understands Apache's rewrite rules (htaccess), but needs to restart the webserver to handle any new or changed .htaccess files. For this reason, OLS is most often used for individual websites that don't change often.
I guess you restart the web server again, because there's no 404 on the post you provided. If you want, please submit a ticket to support@litespeedtech.com for further investigation.
==================
LiteSpeed Enterprise is a webserver fully compatible with Apache. LSWS automatically detects changes in .htaccess and makes adjustments as needed without requiring a restart. For this reason, LiteSpeed Enterprise is often used on shared hosting servers.
Looks like I understood the problem.
 
Top