0
我的文件是在這裏阿帕奇mod_rewrite的條件與NOT條件
PassengerMaxPoolSize 25
PassengerPoolIdleTime 10
<VirtualHost *:80>
RailsEnv development
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /myapp/public
<Directory /myapp/public>
# This relaxes Apache security settings.
AllowOverride All
# MultiViews must be turned off.
Options -MultiViews
</Directory>
RewriteEngine On
ErrorDocument 503 /system/maintenance.html
# RailsAllowModRewrite on
RewriteCond %{REQUEST_URI} !^(home|book-club|blog|login|book-clubs|)$ [NC]
RewriteRule .? http://blog.mysite.com%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_URI} ^/blog
RewriteRule ^/blog/?(.*)$ http://blog.mysite.com/$1 [P,NC,R=301,L]
ProxyPass /blog/ http://blog.mysite.com/
ProxyPassReverse /blog/ http://blog.mysite.com/
</VirtualHost>
<VirtualHost *:80>
ServerName blog.mysite.com
DocumentRoot /var/www/wordpress
<Directory /var/www/wordpress/>
Options FollowSymLinks
AllowOverride All
Options -Indexes
Order allow,deny
allow from all
</Directory>
</VirtualHost>
我想,當用戶打http:://www.mysite.com/home
或http:://www.mysite.com/book-clubs
重定向到mysite.com/home和http :: //www.mysite.com/book-俱樂部,但other than this it redirect to blog.myste.com/<Page-link>
請有人幫助我。
謝謝@olaf它的工作就像一個魅力 – 2014-10-30 05:44:02