开发者

Redirect all to a file using mod-rewrite

I'm trying to redirec开发者_Python百科t all to http://site.com/folder1/folder2/file.php

works perfectly in Windows but not Linux

.htaccess is inside folder1

  RewriteEngine On
  RewriteRule ^(.*)$ folder2/file.php

If I try to access http://site.com/folder1 without last "/" I get "Bad Request" error on Linux

I do not want to change the URL in the address bar

any ideas?


If this is for an Apache httpd.conf, try using something like:

DocumentRoot "location folder1/folder1"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜