Pretty URLs without mod_rewrite, without .htaccess

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

    You can also have urls like

    http://domain.com/index.php/Blog/Hello_World
    

    out of the box with PHP5. You can then read the URL parameters using

    echo $_SERVER['PATH_INFO'];
    

    Remember to validate/filter the PATH_INFO and all other request variables before using them in your application.

提交回复
热议问题