AbanteCart Community
Shopping Cart Operations => Support => General Support => Topic started by: jetman on January 30, 2017, 04:52:26 AM
-
A warning triggered by requesting urls with an specified port number (in this case, port 80) and the configured store url doesn't (this one was caused by a bad bot - must be from the department of redundancy department).
The store url is [http]://www.mydomain.com/ and the request is [http]://www.mydomain.com:80/
This is easily repeatable. Please note that I had to use a http header check tool to trigger the warning myself, modern browsers seem to remove the redundancy before sending the request.
Possible solution is to remove the default port number but still allow non-default port numbers (ex. 8080) before the check on line 168 in /core/lib/config.php
App Warning: AbanteCart core v.1.2.9 Warning: Accessing store with non-configured or unknown domain ( mydomain.com:80/ ).
Check setting of your store domain URL in System Settings . Loading default store configuration for now. in /home/*****/public_html/core/lib/config.php on line 210
php 7.0.13
litespeed
AbanteCart v.1.2.9
-
i think you should to add rewriting for url with port to url without it.
-
Thanks abolabo. I changed our .htaccess to the following:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\. [NC, OR]
RewriteCond %{HTTP_HOST} :80
RewriteRule ^(.*) htp://www.mydomain.com/$1 [L,R=301] (note htp is http)
But I don't think mod_rewrite is an elegant solution since it is more complex for multi-store setups. Every domain would need its own RewriteCond and RewriteRule. php would be the better tool for the job.