访问wordpress&;的web.config;视频教程
我有根文件夹上的codeigniter。和wordpress在子文件夹(主文件夹)上。以下是访问权限:访问wordpress&;的web.config;视频教程,wordpress,.htaccess,codeigniter,web-config,plesk,Wordpress,.htaccess,Codeigniter,Web Config,Plesk,我有根文件夹上的codeigniter。和wordpress在子文件夹(主文件夹)上。以下是访问权限: #RewriteCond %{HTTPS} =on Options -Indexes IndexIgnore * Options +FollowSymLinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [PT,L] Rewri
#RewriteCond %{HTTPS} =on
Options -Indexes
IndexIgnore *
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [PT,L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
RewriteRule ^$ home [L]
我制作了web.config来删除codeigniter的index.php,并在访问根域时重定向到wordpress(主文件夹)。但是在下面的web.config中,我发现了3个问题:
403。访问被拒绝
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true" >
<match url="^$" />
<action type="Rewrite" url="/home" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
备注:该网站位于windows plesk(黑曜石)上。请尝试以下操作:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 2" stopProcessing="true" patternSyntax="Wildcard">
<match url="*" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_URI}" matchType="Pattern" pattern="/home/*" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
<location path="home">
<system.webServer>
<rewrite>
<rules>
<remove name="home" />
<rule name="home" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="home/index.php" redirectType="Found"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</location>
</configuration>