darthomir Posted February 28, 2006 Share Posted February 28, 2006 Hi. I'd like to do this on my site: to have an url such as www.google.com/index which would equal to www.google.com/index.phpI mean that I don't want to type the .php extension for my php files. So, if there is no extension, add the .php and load the php file (if possible, do not display the .php). I'm sure its possible with an htaccess file, but not sure how to do it exactly (something with mod_rewrite for sure).THx! Quote Link to comment Share on other sites More sharing options...
dig412 Posted February 28, 2006 Share Posted February 28, 2006 i dont know much about .htaccess, but a blaggers way to do it would be to make a folder with the same name as the file. then put the file in and call it index.php. this will be fine with 1 or 2 file scripts, but anything more complex and its getting a bit tricky. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 1, 2006 Share Posted March 1, 2006 Using mod rewrite should be what you'll need to accomplish this. There is a manual over at apachefreaks.com for using mod rewrite, but I think apachefreaks.com is down due to them upgrading apachfreaks.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.