基本上我想要的是重定向请求使用HTTPS而不是http
到目前为止,我已经在我的htaccess中使用了这个并且效果很好:代码:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</ifModule>
Run Code Online (Sandbox Code Playgroud)
今天有人注意到,当他去 http://www.example.com时,它会重定向到并显示一个不安全的连接东西.
我的ssl是为非www域设置的:mydomain.com
所以我需要确保所有网站请求都发送到非www和https:如果我将example.com重定向到https://example.com,它可以正常工作
但是通过www.example.com,它会转到htts://www.example.com并显示错误
我需要添加到我的代码中以将www重定向到非www然后再转到ssl?
我无法设法在页面上显示左侧的类别.我选择了设计下的页面 - 布局为3列,右侧显示正常但左侧没有任何内容.magento的新手,所以我不确定在模板中我必须寻找的文件.它是一个自定义模板安装,所以我到目前为止:
app/design/frontend/default/f001/template/
Run Code Online (Sandbox Code Playgroud)
但现在不确定是否要查看目录或paeg文件夹
所以把它作为浏览器的url输出.
{
"data": {
"detections": [
[
{
"language": "en",
"isReliable": false,
"confidence": 0.5714286
}
]
]
}
}
Run Code Online (Sandbox Code Playgroud)
现在我需要从我尝试的返回值中获取"en"值:
$from = $json->data->detections->language;
Run Code Online (Sandbox Code Playgroud)
仍然没有工作.我在这里失踪了什么?
$json = json_decode(file_get_contents($detect));
Run Code Online (Sandbox Code Playgroud) 我得到了下面这个简单的卷曲代码:
$target = "/plugin/api_register.php?name=$activation_name&key=$activation_key&url=$siteurl";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://domain.com'.$target);
curl_setopt($ch, CURLOPT_REFERER, $siteurl);
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$output = curl_exec($ch);
if (empty($output))
{
// some kind of an error happened
die(curl_error($ch));
}
curl_close($ch);
print_r($output);
Run Code Online (Sandbox Code Playgroud)
我得到的只是套接字错误:111,我不明白为什么它不会连接。请帮助
这是错误消息和我的代码.我只是没有看到错误.
描述:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key='cbd1f3bb822e8617b624301774287490d3fcd97e' LIMIT 1' at line 1
查询:
SELECT *
FROM wp_wpsc_api_keys
WHERE name='MichelleAllen17'
AND key='cbd1f3bb822e8617b624301774287490d3fcd97e'
LIMIT 1
Run Code Online (Sandbox Code Playgroud)
欢迎任何关于我的SQL中可能出现问题的想法