Php Apache重写规则以在请求wp admin时停止重定向
我在谷歌云上有一个带有bitnami的apache配置文件。我添加了一个从非www aka example.com重定向到的规则。但是,我想在规则中做一个例外,即/wp admin/目录不会被重定向,而是停留在example.com 更多例子Php Apache重写规则以在请求wp admin时停止重定向,php,wordpress,apache,webserver,hosting,Php,Wordpress,Apache,Webserver,Hosting,我在谷歌云上有一个带有bitnami的apache配置文件。我添加了一个从非www aka example.com重定向到的规则。但是,我想在规则中做一个例外,即/wp admin/目录不会被重定向,而是停留在example.com 更多例子 example.com/launch.html-> example.com/wp-admin/plugins->example.com/wp-admin/plugins(示例) (相同) apacheconf文件原样 <VirtualHost _
<VirtualHost _default_:80>
DocumentRoot "/opt/bitnami/apache2/htdocs"
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
<Directory "/opt/bitnami/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
# Error Documents
ErrorDocument 503 /503.html
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
<VirtualHost _default_:443>
DocumentRoot "/opt/bitnami/apache2/htdocs"
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
<Directory "/opt/bitnami/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
# Error Documents
ErrorDocument 503 /503.html
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
DocumentRoot“/opt/bitnami/apache2/htdocs”
重新启动发动机
重写cond%{HTTPS}=在…上
重写cond%{HTTP_HOST}^(localhost | 127.0.0.1)
重写规则^/(*)https://%{SERVER_NAME}/$1[R,L]
重写cond%{HTTP_HOST}^www\。[北卡罗来纳州]
重写规则^(.*)$http://www.%{HTTP_HOST}%{REQUEST_URI}[R=301,L]
选项索引跟随符号链接
允许超越所有
命令允许,拒绝
通融
= 2.3 >
要求所有授权
#错误文档
错误文档503/503.html
#使用前缀URL安装的Bitnami应用程序(默认)
包括“/opt/bitnami/apache2/conf/bitnami/bitnami apps prefix.conf”
DocumentRoot“/opt/bitnami/apache2/htdocs”
重新启动发动机
重写cond%{HTTP_HOST}^www\。[北卡罗来纳州]
重写规则^(.*)$https://www.%{HTTP_HOST}%{REQUEST_URI}[R=301,L]
选项索引跟随符号链接
允许超越所有
命令允许,拒绝
通融
= 2.3 >
要求所有授权
#错误文档
错误文档503/503.html
#使用前缀URL安装的Bitnami应用程序(默认)
包括“/opt/bitnami/apache2/conf/bitnami/bitnami apps prefix.conf”