我在http://blabla.com/下运行一个 dokuwiki ,现在我有了额外的 url http://wiki.com/
我想要的是将请求http://blabla.com/test/gna或其他任何内容的用户重定向到http://wiki.com/test/gna而不会损害 dokuwiki 的默认 .htaccess
<Files ~ "^([\._]ht|README$|VERSION$|COPYING$)">
Order allow,deny
Deny from all
Satisfy All
</Files>
RewriteEngine on
RewriteBase /dev/
RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L]
RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L]
RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L]
RewriteRule ^$ doku.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) doku.php?id=$1 [QSA,L]
RewriteRule ^index.php$ doku.php
只是在结尾或开头添加这样的东西根本没有任何效果:
Rewritecond %{HTTP_HOST} !blabla.com/
RewriteRule ^/(.*)$ http://wiki.com/$1 [L,R=301]