2013-04-30 185 views
0

我已经为Intranet编写了一个Web应用程序,并且我的链接不在活动服务器上的链接导航上。喜悦。.htaccess子目录子目录

我知道你在想什么:写你的该死的应用程序的权利。指出。

我不知道是否有一个mod_rewrite的/ htaccess的把戏,会送我从..

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

..to ..

/http://example/[src/reports]/etc/etc2/this_stays_the_same.file 

..just将在方括号中的东西,当我把它放在管理/通用目录。

如果有,那将是neato。

谢谢!

回答

1

如果输入http://example/src/reports/...到浏览器,你可以使用一个简单Redirect

Redirect /src/reports /admin/generic 

更新

如果您不希望显示在浏览器栏中的URL /admin/generic/...,你必须做rewrite而不是重定向

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

积分,你可以这样做,并保持url与/ src/reports /相同 – 2013-04-30 14:25:17

+0

@Octopi请参阅最新答案。 – 2013-04-30 14:39:05