A 404 error with a redirect appeared on important categories in WordPress

#1
Hello, dear developers and users of OpenLiteSpeed!
We really need your help and advice!

After moving from the technical branch to the working one, important headings stopped working a few days later:
- https://giport.ru/community
- https://giport.ru/news
- https://giport.ru/sovet
there is a redirect to the 404 page, and a slash is added to the addresses.

These addresses work well on the technical branch:
- https://dev.giport.ru/sovet
- https://dev.giport.ru/news

I tried to disable plugins: Redirection, LiteSpeed Cache, Yoast SEO, Theme plugin, cleaned the file .htaccess, did link regeneration, did a soft restart of OLS, deleted the /usr/local/lsws/cachedata folder, cleared the browser cache - nothing helped.
There are no fields with the same community name in the wp_posts database table, in the post_name column.

The peculiarity of this error is still in different 404 pages: https://skr.sh/s8suRmah3wU (on the right is a normal 404 redirect page with an incorrect address, and on the left is an abnormal 404 page from OLS).

Since disabling plugins did not help, I think that the problem lies in the OpenLiteSpeed settings.
Maybe someone has faced a similar problem or can you tell me where else you can dig?

The server runs on: CyberPanel, OLS 1.7.11, WordPress, PHP 7.4, MariaDB, LiteSpeed Cache
 

Attachments

Cold-Egg

Administrator
#2
Hi,
Even the home page https://giport.ru/ returns a 404. Could you make sure this virtual host has this domain giport.ru included?
Also, have you changed the Home URL and site URL after moving from the technical branch to the working one?
 
#3
Hi,
Even the home page https://giport.ru/ returns a 404. Could you make sure this virtual host has this domain giport.ru included?
Sorry, there were problems on the server this morning, we restored the work.
The described errors are still relevant.
Due to the fact that the forum is at https://giport.ru/community it didn't work, I had to replace the slug with https://giport.ru/forum
Unfortunately, I can't even make a 301 redirect from the address /community >
/ forum, because a redirect to /community /is included from the address/ community / and a 404 error.
Again, all caching plugins are currently disabled.
Is it possible to specify addresses in OpenLiteSpeed itself that do not need to be cached?
 
#5
For no cache, you can exclude it from the LSCache plugin.
https://docs.litespeedtech.com/lscache/lscwp/cache/#do-not-cache-uris
For the redirect part, can you share the rewrite rule? or the whole .htaccess file content?
Caching of the admin panel and Forum in LiteSpeed Cache is disabled.

.htaccesse
-----------------------
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule \.object-cache\.ini - [F,L]

### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###

### marker LOGIN COOKIE start ###
RewriteRule .? - [E="Cache-Vary:wp-postpass_4592bcc4e5b4fceae5f9542e39902927"]
### marker LOGIN COOKIE end ###

### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###

### marker WEBP start ###
RewriteCond %{HTTP_ACCEPT} "image/webp" [or]
RewriteCond %{HTTP_USER_AGENT} "Page Speed"
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).*Safari
RewriteCond %1 >13
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
### marker WEBP end ###

### marker DROPQS start ###
CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga
### marker DROPQS end ###

</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A31557600
ExpiresByType image/x-icon A31557600
ExpiresByType image/vnd.microsoft.icon A31557600
ExpiresByType image/svg+xml A31557600

ExpiresByType image/jpg A31557600
ExpiresByType image/jpeg A31557600
ExpiresByType image/png A31557600
ExpiresByType image/gif A31557600
ExpiresByType image/webp A31557600

ExpiresByType video/ogg A31557600
ExpiresByType audio/ogg A31557600
ExpiresByType video/mp4 A31557600
ExpiresByType video/webm A31557600

ExpiresByType text/css A31557600
ExpiresByType text/javascript A31557600
ExpiresByType application/javascript A31557600
ExpiresByType application/x-javascript A31557600

ExpiresByType application/x-font-ttf A31557600
ExpiresByType application/x-font-woff A31557600
ExpiresByType application/font-woff A31557600
ExpiresByType application/font-woff2 A31557600
ExpiresByType application/vnd.ms-fontobject A31557600
ExpiresByType font/ttf A31557600
ExpiresByType font/otf A31557600
ExpiresByType font/woff A31557600
ExpiresByType font/woff2 A31557600

</IfModule>
### marker BROWSER CACHE end ###

## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
# BEGIN WordPress
# Директивы (строки) между `BEGIN WordPress` и `END WordPress`
# созданы автоматически и подлежат изменению только через фильтры WordPress.
# Сделанные вручную изменения между этими маркерами будут перезаписаны.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

### Rewrite Rules Added by CyberPanel Rewrite Rule Generator

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

### End CyberPanel Generated Rules
 

Attachments

#7
Yes, these categories /news and / sovet work, for example:
- https://giport.ru/news/news-nnov/v-...-poyavitsya-novoe-obshhestvennoe-prostranstvo
- https://giport.ru/sovet/auto-world-...luataczii-pokryshek-i-kak-eto-pravilno-sdelat
Also, they work on a technical domain, as I wrote above:
- https://dev.giport.ru/sovet
- https://dev.giport.ru/news
Why did all these problems start after transferring the site from the technical dev domain to the working branch, including with /forum/?

Last night, after I decided to disable minifi CSS and JS in LiteSpeed Cache (https://skr.sh/s8xapeBCsGN), due to errors in the browser console (https://skr.sh/s8xaqOe7DNd) the link broke again https://giport.ru/forum (a redirect to page 404 with a slash was enabled https://giport.ru/forum/).
And after that, a 404 error disappeared from the address https://giport.ru/community - it's working.
I tried to bring back the minifi settings for CSS and JS, but to no avail.
I disabled the LiteSpeed Cache plugin, did a Graceful Restart, tried to completely delete the /usr/local/lsws/cachedata folder - nothing helps!
Somewhere inside these addresses: https://giport.ru/community and https://giport.ru/forum -cache the 404 error in turn.

Please help, I can't change links every 3 days for 38000 forum topics. This is very bad for SEO.

For the last 3 weeks, every day there is some new unpleasant surprise associated with OpenLiteSpeed. (

If I give you access to CyberPanel, OpenLiteSpeed and the WP admin panel, will you be able to find the cause of these problems?


Here's the updated one .htaccesse
-----------------------

# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule \.object-cache\.ini - [F,L]

### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###

### marker LOGIN COOKIE start ###
RewriteRule .? - [E="Cache-Vary:wp-postpass_4592bcc4e5b4fceae5f9542e39902927"]
### marker LOGIN COOKIE end ###

### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###

### marker WEBP start ###
RewriteCond %{HTTP_ACCEPT} "image/webp" [or]
RewriteCond %{HTTP_USER_AGENT} "Page Speed"
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).*Safari
RewriteCond %1 >13
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
### marker WEBP end ###

### marker DROPQS start ###
CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga
### marker DROPQS end ###

</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
# BEGIN WordPress
# Директивы (строки) между `BEGIN WordPress` и `END WordPress`
# созданы автоматически и подлежат изменению только через фильтры WordPress.
# Сделанные вручную изменения между этими маркерами будут перезаписаны.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

### Rewrite Rules Added by CyberPanel Rewrite Rule Generator

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

### End CyberPanel Generated Rules
 
Top