Pretty URLs without mod_rewrite, without .htaccess

后端 未结 8 647
轮回少年
轮回少年 2020-12-03 02:27

Without a possibility to access .htaccess I find myself in a creative impasse. There is no mod_rewriting for me. Nevertheless, I want to be able to do the n

8条回答
  •  余生分开走
    2020-12-03 02:38

    If you omit a trailing slash, Apache will serve the first file [alphabetically] which matches that name, regardless of the extension, at least on the 2 servers I have access to.

    I don't know how you might use this to solve your problem, but it may be useful at some point.

    For example if http://www.somesite.com/abc.html and http://www.somesite.com/abc.php both exist and http://www.somesite.com/abc is requested, http://www.somesite.com/abc.html will be served.

提交回复
热议问题