as for the http_host problem.
Does anyoen see why this won;t work;
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE url = '" . $db->escape(HTTP_SERVER) . "' OR url = '" . $db->escape(str_replace('www.', '', HTTP_SERVER)) . "'");
Why not just?:Daniel wrote:$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE url = '" . $db->escape(HTTP_SERVER) . "' OR url = '" . $db->escape(str_replace('www.', '', HTTP_SERVER)) . "'");
Code: Select all
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE url = '" . $db->escape(str_replace('www.', '', HTTP_SERVER)) . "'");
Last edited by scot80 on Fri Mar 12, 2010 8:55 pm, edited 1 time in total.
I would prefer that people put www. in the their doman name. if they want to then my fix will work with and without www.
where as scotts example would mean that in the admin the user would not be allowed to be www. in.
i'm right.
where as scotts example would mean that in the admin the user would not be allowed to be www. in.
i'm right.
OpenCart®
Project Owner & Developer.
But scots would match the domain regardless.
Your code searches for:
www.domain.com/shop/
or
domain.com/shop/
scots change just searches for
domain.com/shop/
which would already match both cases
Its just redundant. both will work
Your code searches for:
www.domain.com/shop/
or
domain.com/shop/
scots change just searches for
domain.com/shop/
which would already match both cases
Its just redundant. both will work
Who is online
Users browsing this forum: No registered users and 10 guests