【发布时间】:2015-09-29 10:07:23
【问题描述】:
我试图在 htacces 配置中得到这个结果
如果 (www.domain.de/some/projects/) 在 webspace root/some/subdir/projetcs/index.php 上执行 别的 在 webspace root/index.php 上执行
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/some/subdir/projects/.*$
RewriteRule ^(.*)$ /some/subdir/projects/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
我只希望将 1 个链接重定向到网络空间上的子目录,希望有人可以帮助我,我现在正在尝试超过 1 天。
【问题讨论】:
-
我怎样才能实现在子文件夹中加载另一个 php 脚本然后 index.php?喜欢
-
RewriteRule ^ /some/subdir/projects/web/app.php [L,R=301]
标签: .htaccess mod-rewrite rewrite