重定向太多。使用 htaccess 将路径重定向到子文件夹
Too many redirects. Rirect path to subfolder using htaccess
我已经在要安装的子目录中加载了 wordpress。它的路径是
public_html/revslider-standalone
这是完整路径
http://greenlinerenovations.com/revslider-standalone
当我在浏览器中打开这个 URL 时,它说重定向太多。下面是我的 .htaccess
代码
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^About+$ about.php
RewriteRule ^FAQ+$ faq.php
RewriteRule ^Contact+$ contact.php
RewriteRule ^Gallery+$ gallery.php
RewriteRule ^Areas-we-service+$ cities.php
RewriteRule ^(([^/]+/)*[^.]+)$ servicesparse.php?name=
应该添加或更正什么规则才能在该路径上安装 Wordpress?
htaccess 文件中的重定向是必需的,因此无法将其删除。无论如何添加新规则并且有效吗?
使用:
RewriteEngine On
RewriteRule ^About$ about.php [NC,L]
RewriteRule ^FAQ$ faq.php [NC,L]
RewriteRule ^Contact$ contact.php [NC,L]
RewriteRule ^Gallery$ gallery.php [NC,L]
RewriteRule ^Areas-we-service$ cities.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(([^/]+/)*[^.]+)$ servicesparse.php?name=
在最后一条规则 RewriteCond
之前 RewriteRule
我已经在要安装的子目录中加载了 wordpress。它的路径是
public_html/revslider-standalone
这是完整路径 http://greenlinerenovations.com/revslider-standalone
当我在浏览器中打开这个 URL 时,它说重定向太多。下面是我的 .htaccess
代码RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^About+$ about.php
RewriteRule ^FAQ+$ faq.php
RewriteRule ^Contact+$ contact.php
RewriteRule ^Gallery+$ gallery.php
RewriteRule ^Areas-we-service+$ cities.php
RewriteRule ^(([^/]+/)*[^.]+)$ servicesparse.php?name=
应该添加或更正什么规则才能在该路径上安装 Wordpress? htaccess 文件中的重定向是必需的,因此无法将其删除。无论如何添加新规则并且有效吗?
使用:
RewriteEngine On
RewriteRule ^About$ about.php [NC,L]
RewriteRule ^FAQ$ faq.php [NC,L]
RewriteRule ^Contact$ contact.php [NC,L]
RewriteRule ^Gallery$ gallery.php [NC,L]
RewriteRule ^Areas-we-service$ cities.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(([^/]+/)*[^.]+)$ servicesparse.php?name=
在最后一条规则 RewriteCond
之前 RewriteRule