Zie Posted May 10, 2008 Share Posted May 10, 2008 How do websites remove the file extensions on their pages? In example, how google uses something like this: http://www.google.com/webhp?tab=mwI've been looking around the web for awhile, and couldn't find much relevant information, and the information that was relevant, didn't work. I'm sure this isn't the right forum, but I couldn't find a forum that seemed like it should go there. Link to comment Share on other sites More sharing options...
Ingolme Posted May 10, 2008 Share Posted May 10, 2008 If, under the folder "mail", you put a file called "index.php" (in most servers) you will be able to access it by typing http://yourdomain.com/mail/ Link to comment Share on other sites More sharing options...
Zie Posted May 10, 2008 Author Share Posted May 10, 2008 I'm sorry, I just realized that wasn't the best of examples I posted. I already knew what you have said. Sorry about that.This is what I meant:http://www.google.com/webhp?tab=mwNotice the webhp part, that is what I am talking about. Link to comment Share on other sites More sharing options...
Ingolme Posted May 10, 2008 Share Posted May 10, 2008 Hmm, for that I think you'd have to change the configuration of the server to execute PHP in files that don't have an extension. Link to comment Share on other sites More sharing options...
Zie Posted May 10, 2008 Author Share Posted May 10, 2008 Could I use MIME types for that? If so, how would I tell it that it wont have an extension? Link to comment Share on other sites More sharing options...
Ingolme Posted May 10, 2008 Share Posted May 10, 2008 I don't know much about it I deal with programming and mark-up languages. I never do any work with the server itself. Link to comment Share on other sites More sharing options...
Zie Posted May 10, 2008 Author Share Posted May 10, 2008 I don't really know too much about it either, I mainly stick with php or html. Thanks for your information though! Link to comment Share on other sites More sharing options...
Synook Posted May 11, 2008 Share Posted May 11, 2008 You can use Apache's mod_rewrite to append the .php onto URLs that don't have it (when requested from your server). RewriteRule ^(.*?)\?(.*?)$ $1.php?$2 Link to comment Share on other sites More sharing options...
king Posted May 11, 2008 Share Posted May 11, 2008 Google does not use PHP. Most sites that use PHP (e.g. wikipedia, mysql.com, etc.) will have the .php extension on its pages. Link to comment Share on other sites More sharing options...
aszxcv Posted May 11, 2008 Share Posted May 11, 2008 Google does not use PHP. Most sites that use PHP (e.g. wikipedia, mysql.com, etc.) will have the .php extension on its pages.what does google use? Link to comment Share on other sites More sharing options...
king Posted May 11, 2008 Share Posted May 11, 2008 what does google use?Google uses Python.http://www.google.com/support/googleanalyt....py?topic=13909Some google pages (like the one above) has the .py extension. The .py extension means that the page uses Python. Link to comment Share on other sites More sharing options...
aszxcv Posted May 11, 2008 Share Posted May 11, 2008 thanks Link to comment Share on other sites More sharing options...
Synook Posted May 11, 2008 Share Posted May 11, 2008 Wikipedia uses PHP, but they also use mod_rewrite to hide the extension. In fact, their RewriteRule is fairly complex, with paths converted into querystrings. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.