Rewriting with lighttpd - how to remove file extensions

后端 未结 4 1014
囚心锁ツ
囚心锁ツ 2021-01-07 02:12

I would like to use lighttpd\'s mod_rewrite to allow requests without a specific file extension. For instance, I would like the following mappings to automatically work:

4条回答
  •  醉梦人生
    2021-01-07 03:09

    yes

    ^(.*).php $1 [L,R,NC,QSA]

    that would be for .htaccess in a directory

    ^/(.*).php http://same.site/$1 [L,R,NC,QSA]

    where your domain is 'same.site' because it needs to redirect for the URL to change (as opposed to proxy)

提交回复
热议问题