为多个目录寻找Zeus的一些帮助我有一个工作脚本,它在我将Wordpress放在一个子目录中-然而,如果我想在另一个目录中运行另一个Wordpress安装,我也无法让重写与此一起工作。任何帮助都将不胜感激!
我对1个目录的重写
#Zeus webserver version of basic Wordpress mod_rewrite rules
map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if exists then goto END
look for dir at %{SCRATCH:path}
if exists then goto END
##### FIX FOR LOGIN/FORGOTTEN PASSWORD/ADMIN ETC #####
match URL into $ with ^/site1/wp-.*$
if matched then goto END
##### FIX TO ALLOW SEARCH TO WORK #####
match URL into $ with ^/oxford-walking-tours/(.*)
set URL = /site1/index.php/$1那么,第一个目录中的site1 --有没有人能建议我如何在site2上也这样做呢?
谢谢
发布于 2012-12-14 19:04:43
下面的脚本可能会帮助所有重定向它的ZEUS服务器忽略名为myfolder的文件夹(将其替换为您希望从任何重定向中排除的文件夹,您仍然可以访问它)。
文件的其余部分重定向到www形式的网站的.com版本(rule2),而不是www形式的网站(rule1)。
将文件另存为rewrite.script并上传到服务器的根目录。
#ignore anything to do with myfolder
match URL into $ with ^/myfolder(\/)?.*
if matched then goto END
RULE_1_START:
match IN:Host into $ with ^mywebsite\.net$
if matched then
match URL into $ with ^/(.*)$
if matched then
set OUT:Location = http://www.mywebsite.com/$1
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
endif
endif
RULE_1_END:
RULE_2_START:
match IN:Host into $ with ^www.\mywebsite\.net$
if matched then
match URL into $ with ^/(.*)$
if matched then
set OUT:Location = http://www.mywebsite.com/$1
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
endif
endif
RULE_2_END:https://stackoverflow.com/questions/10319104
复制相似问题