[英]Redirect htaccess old folder to a new folder with index.php
I need a big help. 我需要很大的帮助。 My
htaccess
is configured to redirect all http
content to https
and this works fine, but is the root content only. 我的
htaccess
配置为将所有http
内容重定向到https
并且工作正常,但仅是根内容。
I spent a lot of time researching the web how to redirect the contents of a website with URL not SSL
to a new SSL
URL, but the solutions i've found does not work on my scenario. 我花了很多时间研究网络如何将URL而不是
SSL
的网站内容重定向到新的SSL
URL,但是我发现的解决方案不适用于我的情况。
My .HTACCESS 我的.HTACCESS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R=301]
What I want is this. 我想要的是这个。
when the user visits the http://www.example.com/oldfolder/index.php?site=document-name redirect to https://example.com/new-folder/other-folder/index.php?site=document-name 当用户访问http://www.example.com/oldfolder/index.php?site=文档名称时,重定向到https://example.com/new-folder/other-folder/index.php?site=文件名
But i found nothing. 但是我什么也没发现。
Thanks. 谢谢。
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.org$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.org$
RewriteRule ^/?$ "https\:\/\/www\.example\.org\/home\/" [R=301,L]
Here the redirection will work if someone types example.org
. 如果有人键入
example.org
则重定向将在此起作用。 The person will be redirected to example.org/home
. 该人将被重定向到
example.org/home
。 To see just click here cubehub.org 要查看,请单击此处cubehub.org
If you're using Cpanel just go to Redirects( cPanel >> Home >> Domains >> Redirects
) and set the URL redirection. 如果您使用的是Cpanel,只需转到Redirects(
cPanel >> Home >> Domains >> Redirects
)并设置URL重定向。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.