htaccess的问题强制SSL(.htaccess issue to force SSL)

   IT问题网   2018-12-07 00:00:00

问 题

我对我的一个网站(基于字press)激活ssl和要修改的.htaccess 修改内容的链接为https。
我的意思是,到 https://www.example.com/products.html 页面是一个 http://example.com/blah-blah .jpg
我想把它通过的.htaccess 更改为 https://www.example.com/blah-blah.jpg 和我没有任何想法! :|
我安装和激活 https的word press 插件,但一些链接不更改为https。

解决方案

先生。舒尔曼的解决方案忘记了域名之后的斜线,这样用户会被重定向到 的https:// www .example.comcategory / cat1 / cat2 /这是不完全正确。我加了一个斜线给他的.htaccess项,和它的工作就好了。试想一下:

 的rewritecond%{} https关闭
重写规则(。*)https://example.com/$1 [r]
 

标签:问题强制强迫



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

IfModule不会出现是工作?(IfModule doesn't appear to be working)

problem if i use this: lt;ifmodule mod_rewrite.cgt; rewr ...

我怎样才能利用外界信息的URL重写?(How can I get use outside information in url rewrites)

problem hopefully some of you .htaccess gurus can help me ...

基于URL到一个新的页面的RewriteCond重写规则进行的.htaccess,定期EX pression(RewriteCond RewriteRule for .htaccess based on URL to a new page, regular expression)

problem i have an interesting rewriterule and i am not su ...

的.htaccess,mod_rewrite的,正则表达式用目录和文件类型(.htaccess, mod_rewrite, regex with directory and filetype)

problem i want to do a rewrite with the following conditi ...

.htaccess的语言重定向310错误(Htaccess language Redirect 310 error)

problem i have a two language site swedish sidewww.site ...

重定向一切的index.php(Redirection everything to index.php)

problem i wan't to redirect everything to index.php exepe ...

生成SE友好的URL的.htaccess国防部重写(Generating SE friendly URL .htaccess mod rewrite)

problem i've a url which get file name through get method ...

htaccess的子域名重定向(htaccess subdomain redirect)

problem i've searched around and tried a few ...

UrlRewrite 3 GET请求(UrlRewrite with 3 get request)

problem i'm working on a project and stuck on urlrewrite. ...

mod_rewrite的:恶意重定向(Mod_ReWrite: Unwanted redirect)

problem possible duplicate: .htaccess, clean ...

限制用户子目录(limiting users to subdirectories)

problem i have a subdirectory of users that i want to lim ...

重定向子文件夹的.htaccess(Redirection Subfolder Htaccess)

problem i want a redirect using htaccess i have a post na ...

使用的.htaccess,从来没有表现出的index.php(Using .htaccess, never show index.php)

problem how can i never show index.phpfor example, all re ...

在子域的内部服务器错误(internal server error in subdomains)

problem i installed worpress to my main domain abcd.com. ...

基于用户代理手机网站重定向(Mobile website redirection based on user agent)

problem say i've got two distinct domains: ...

的Joomla htaccess的不工作(Joomla htaccess not working)

problem i am using joomla 1.7 and using joomla's built in ...

扩大友好的URL,国防部重写(Expanding friendly url, mod rewrite)

problem i am using modx, which is a cms system. it has a ...

共享主机Zend的项目?(zend project on shared hosting )

problem i created a zend project on localhost on ubuntu o ...

URL结构的htaccess(url construction htaccess)

problem lets say i have a link to one of my page that loo ...

htaccess的重写规则(.htaccess RewriteRule)

problem i'm trying to write a rewriterule (with no luck) ...