0

I want:
domain.com/example
to target:
domain.com/folder/example.cshtml

Can anyone help me with the rewrite rule for it?



Every suggestion is much appreciated :)


I have edited the question so that it actually focuses on what is important.

4

2 回答 2

0

你为什么不使用mod-rewrite?

RewriteCond %{THE_REQUEST} /folder/example.cshtml
RewriteRule ^$ /example.cshtml [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^example.cshtml /folder/example.cshtml [L]

有时你需要稍微弄乱斜线

于 2013-02-24T12:20:54.983 回答
0

我想它不能按照我想要的方式完成。我将不得不移动example.cshtml到根目录。

于 2013-02-24T12:40:17.193 回答