mod_rewrite VS relative paths

前端 未结 5 2127
耶瑟儿~
耶瑟儿~ 2021-02-06 14:03

My mod_rewrite code is:

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Rewrite         


        
5条回答
  •  囚心锁ツ
    2021-02-06 14:24

    The server won't ever know whtether the request came via relative or absolute path so there is nothing You can do about it. As stated in another answer, You could make exceptions but maintaining all of them etc will become PITA at some point. ;)

    I always use absolute paths especially when rewriting so I'd suggest just that, it's the easiest way

提交回复
热议问题