Dynamically created pages not working when visited directly

I have this website on cyberpanel on a litespeed server:

It was recently moved over from WPX, where everything was working fine.
After moving to the current server, the dynamically created pages created by a real estate plugin end up at 404 error pages, if visiting the pages directly.

For example, to reproduce the error, if you start here:

click on one of the listings (it loads properly)
if you refresh the page (or copy and paste the link to visit the page directly), you end up at a 404 page.

I’m quite certain this is an issue with the set up in cyberpanel. It was working ok when the website was at WPX hosting which is also on litespeed server.

I feel like the issue is related to how sometimes when adding a new website to the server, there are sometimes some looping redirects, until things are more fully set up. I’m not sure, it’s past my understanding.

Maybe something needs to be changed in “vHost conf”?

Below is the .htaccess file contents:


LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!

RewriteEngine on CacheLookup on RewriteRule .* - [E=Cache-Control:no-autoflush] RewriteRule \.litespeed_conf\.dat - [F,L]

marker CACHE RESOURCE start

RewriteRule wp-content/./[^/](responsive|css|js|dynamic|loader|fonts).php - [E=cache-control:max-age=3600]


marker LOGIN COOKIE start

RewriteRule .? - [E=“Cache-Vary:,wp-postpass_fddd4451ddcb9fe08bb2a59390395360”]

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

## 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 ###START: Force WWW to NON-WWW RewriteEngine On RewriteCond %{HTTP_HOST} ^www.(.*)$ RewriteRule ^(.*)$ http://%1/$1 [L,R=301] ###END: Force WWW to NON-WWW

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

RewriteEngine On
RewriteCond %{REQUEST_URI} /wps/rest/21806/image/account.photo(.)
RewriteRule .
- [F]

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} MJ12bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} MegaIndex.ru [NC,OR]
RewriteCond %{HTTP_USER_AGENT} bingbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} DotBot [NC]
RewriteRule .* - [F]

deny from

BEGIN litespeed noabort

RewriteEngine On RewriteRule .* - [E=noabort:1] # END litespeed noabort

log php errors

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_value error_log /domains/realestatecoalharbour.com/public_html/php-errors.log

BEGIN WordPress

The directives (lines) between “BEGIN WordPress” and “END WordPress” are

dynamically generated, and should only be modified via WordPress filters.

Any changes to the directives between these markers will be overwritten.

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]

END WordPress

BEGIN ShortPixelWebp

The directives (lines) between “BEGIN ShortPixelWebp” and “END ShortPixelWebp” are

dynamically generated, and should only be modified via WordPress filters.

Any changes to the directives between these markers will be overwritten.

END ShortPixelWebp

Hello @frankyfire

  1. Disable the LSCACHE plugin and retry.
  2. Which plugin are you using I recreate the scenario? Are you using Firewall maybe its blocking the plugin calls. I have worked with IDX plugin back in the day and it had a conflict with BPS for particular calls.

The Listing plugin pulling data via https://prod-api.hoodq.com/v2/address-highlights for a single listing when you reload the cache is read but its empty e.g. https://realestatecoalharbour.com/downtown-vancouver-condos-for-sale/listing.r2686623-614-138-e-hastings-street-vancouver-v6a-1n4.97024395/. To me looks like the request has to have certain parameters or come from specific origin

hi @josephgodwinke
Thanks for your reply.

  1. I’ve disabled the litespeed cache plugin in wordpress and I still get the 404 error.
  2. I also tried disabling the security plugins (wordfence and wp cerber) as well as litespeed cache plugin and error is still there. What is BPS? Bullet Proof Security plugin? Here’s the list of all plugins that are active on the site:

I do have “ConfigServer Security & Firewall - csf v14.17” up and running in CyberPanel.
Anything that should potentially be tweaked there?

I also tried disabling “ConfigServer Security & Firewall” and the “litespeed cache” wordpress plugin and error is still there.

When you disable a security plugin and/or cache plugin always reset .htaccess file to default wordpress one

I just tried this now and still getting error.

Hello send me the plugin name or link I test on a new installation

Do I need some sort of realestate broker account to leverage api used by the plugin?

The plugin is called “myRealPage IDX Listings”
I think this is the website for it:

It’s free for 30 days.
I don’t think any sort of login is needed.

If you don’t want to go through the form, I’ve zipped up the folder of the plugin from the realestatecoalharbour.com website:

The properties are added to a page via shortcode which has some IDs and things inside. Here’s an example:
[mrp account_id=21806 listing_def=search-1206603 context=recip init_attr=sort~price_asc,ipp~12 perm_attr=tmpl~v2,sliders~yes,collapse_sliders~no]

You could try putting that on a page of the new install. I’m not sure if the shortcode with account_id is tied to the domain or not.

Thank you so much.

Hello @frankyfire

  1. First visit Vancouver BC Coal Harbour Condos for Sale - MLS Listings

  2. Click on first listing

  3. Post the contents of your https://SERVER_URL:8090/serverstatus/cyberCPMainLogFile


  1. Add the following line to the wp-config.php file:

define('DISABLE_WP_CRON', true);

  1. Set up a real cron job that runs at fixed intervals regardless of site traffic:

cd /home/samhuang.ca/realestatecoalharbour.com/public_html; php -q wp-cron.php