Pretty URLs without mod_rewrite, without .htaccess

后端 未结 8 632
轮回少年
轮回少年 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:34

    If you've the permissions to set custom error documents for your server you could use this to redirect 404 requests.

    E.g. for Apache (http://httpd.apache.org/docs/2.0/mod/core.html#errordocument)

    ErrorDocument 404 /index.php
    

    In the index.php you then can proceed your request by using data from the $_SERVER array.

提交回复
热议问题