I have created two applications in my symfony project, but my second application i can only access using开发者_如何学运维 .php extension.
example http://192.168.1.3:9000/backend.php
I want to remove the .php extension from the backend project, is possible?
Help is highly appreciated.
Thanks,
You can rename your backend.php
file to just backend
without extension, then use following in your .htaccess
config:
<Files backend>
ForceType application/x-httpd-php
</Files>
(One could also use DefaultType
to make that possible for all php scripts, but this would cause extra work with unsetting it again in subfolders for security reasons.)
So you want to remove the extension from the file on the server [backend file on server]? or the url [http://192.168.1.3:9000/backend]? Both can be done via htaccesss
精彩评论