不使用.htaccess删除文件扩展名

Is there a way of removing file extensions from my urls without using .htaccess? Like if my url is http://example.com/index.html, can I make it http://example.com/index without using .htaccess? Reason I ask is because I do not have access to the .htaccess file.

It is possible and widely covered here. I will not copy paste whole article here.

You can also have urls like

http://example.com/index.php/your/fancy/url 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.