<Location />
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !.(js|ico|gif|jpg|jpeg|pdf|png|css)$|.*(yemaosheng_com|DirectoryName).* /index.php
</Location> |
<Location />
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !.(js|ico|gif|jpg|jpeg|pdf|png|css)$|.*(yemaosheng_com|DirectoryName).* /index.php
</Location>
另一个其它框架的转跳
# if the yemaosheng_com directory exists, then let apache handle it.
RewriteCond %{REQUEST_URI} ^/yemaosheng_com/.*$
RewriteRule (.*) $1 [L]
# if the file exists, then let apache handle it.
# index.php should be the only php available for direct access.
RewriteCond %{DOCUMENT_ROOT}/%{SCRIPT_FILENAME} -f
RewriteRule (.*) $1 [L]
# else processit specially
RewriteRule (.*) /index.php?$1 [L] |
# if the yemaosheng_com directory exists, then let apache handle it.
RewriteCond %{REQUEST_URI} ^/yemaosheng_com/.*$
RewriteRule (.*) $1 [L]
# if the file exists, then let apache handle it.
# index.php should be the only php available for direct access.
RewriteCond %{DOCUMENT_ROOT}/%{SCRIPT_FILENAME} -f
RewriteRule (.*) $1 [L]
# else processit specially
RewriteRule (.*) /index.php?$1 [L]
访问指定的目录时转跳并保持原来域名
RewriteCond %{REQUEST_URI} /news/ [NC]
RewriteRule ^.*$ http://yemaosheng.com/blog/ [P,L] |
RewriteCond %{REQUEST_URI} /news/ [NC]
RewriteRule ^.*$ http://yemaosheng.com/blog/ [P,L]
Related Posts