www重定向到非www,尽管我尝试了一切
我正在尝试将域的所有版本重定向使用https:// non-www版本。我在这个论坛上尝试了许多代码,并回答了其他类似问题。我使用WordPress和DirectAdmin并尝试了以下操作:
- 安装了几个重定向插件,并将默认URL设置为https:// non-www
- 创建的REGEX规则
- 在在线启动时添加了一堆代码以下)
- 使用CloudFlare上的页面规则
似乎没有任何作用。
RewriteEngine On
RewriteCond %{HTTP_HOST} !^salamtavalod.ir$
RewriteRule ^(.*)$ https://salamtavalod.ir/$1 [R=301,L]
I'm trying to redirect all versions of my domain to use https:// non-www version. I've tried many codes on this forum and answers to other similar questions. I use WordPress and DirectAdmin and tried the following:
- Installed a couple of redirection plugins and set the default url to https://non-www
- Created Regex rules
- Added a bunch of codes at the begining of the .htaccess file found online (like the following)
- Used page rules on CloudFlare
Nothing seems to be working.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^salamtavalod.ir$
RewriteRule ^(.*)$ https://salamtavalod.ir/$1 [R=301,L]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论