URL 将多个文件夹重写为一个文件夹
我在 IIS6/Server03 上使用 IIRF ,并在根目录中使用 MVC 应用程序服务器和 WordPress blog/cms 的虚拟目录。 理想情况下,我希望网址如下...
- domain.com/domain.com/wpcategory/
- -> 重写自domain.com/blog/wpcategory/domain.com/wpcategory/warticle/
- -> 重写自domain.com/blog/wpcategory/article/
感谢 ISAPI 插件,我可以使用 modrewrite esque 代码...
## REGIONAL GUIDES ##
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /guides /guides/index.php [L]
但是禁止编写指南指南等我正在努力弄清楚什么或者即使我实际上可以做到这一点或如果它需要位于子文件夹中domain.com/wp/wpcategory/article(目前工作正常。 本质上是希望在不填充 MVC 的情况下将基础重写为站点的根目录...有趣吗?
I'm using IIRF on IIS6/Server03 with an MVC app in the root of the server and a virtual directory for the wordpress blog/cms. I'd ideally like the urls as follows...
- domain.com/
- domain.com/wpcategory/ -> rewritten from domain.com/blog/wpcategory/
- domain.com/wpcategory/wparticle/ -> rewritten from domain.com/blog/wpcategory/article/
Thanks to the ISAPI Plugin I can use modrewrite esque code...
## REGIONAL GUIDES ##
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /guides /guides/index.php [L]
But bar writing guides to guides etc I'm struggling to work out what or even if I can actually do that or if it needs to be in a subfolder domain.com/wp/wpcategory/article (which currently works fine.
Essentially looking to rewrite the base to the root of the site without stuffing MVC... Fun?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ISAPI_Rewrite 3 的解决方案是:
The solution for ISAPI_Rewrite 3 is: