Php .htaccess子目录到子目录

Php .htaccess子目录到子目录,php,.htaccess,Php,.htaccess,我已经为内部网编写了一个web应用程序,我的链接与实时服务器上的链接导航不匹配。乔伊 我知道你在想什么:把你该死的应用程序写对。注意到 我想知道是否有一个mod_rewrite/htaccess技巧可以让我从 /http://example/[admin/generic]/etc/etc2/this_stays_the_same.file …到 /http://example/[src/reports]/etc/etc2/this_stays_the_same.file ..当我将其放在ad

我已经为内部网编写了一个web应用程序,我的链接与实时服务器上的链接导航不匹配。乔伊

我知道你在想什么:把你该死的应用程序写对。注意到

我想知道是否有一个mod_rewrite/htaccess技巧可以让我从

/http://example/[admin/generic]/etc/etc2/this_stays_the_same.file
…到

/http://example/[src/reports]/etc/etc2/this_stays_the_same.file
..当我将其放在admin/generic目录中时,只需转换方括号中的内容

如果有,那就是尼托


谢谢

如果您输入
http://example/src/reports/...
进入浏览器后,您可以使用

更新

如果不想在浏览器栏中显示
/admin/generic/…
URL,则必须执行重定向而不是重定向

RewriteEngine on
RewriteRule ^src/reports/(.*)$ /admin/generic/$1 [L]

奖励积分,您能做到这一点并保持url与/src/reports/相同吗?
RewriteEngine on
RewriteRule ^src/reports/(.*)$ /admin/generic/$1 [L]