开发者

Redirect all to a file using mod-rewrite

开发者 https://www.devze.com 2023-02-03 20:23 出处:网络
I\'m trying to redirec开发者_Python百科t all to http://site.com/folder1/folder2/file.php works perfectly in Windows but not Linux

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

精彩评论

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

关注公众号