Jump to content
MakeWebGames

Get rid of .php! No file extensions in links!


Konsigliare

Recommended Posts

Does not enhance security in any way!

I just find it makes your site look more professional!

This will allow you to use links such as

rather than
All it requires is you to open .htaccess on your public_html folder, via cPanel or FTP

Once opened paste:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

 

You do not rename any files at all.

Any subdirectories you have will also be able to be accessed without .php

You can change the .php in the code to whatever your main file extension is

This code is not for mccode it works with any .php file, whether it is kiddy porn or mccode

If you have dynamic urls (http://game.net/login.php?mode=gay) simply use http://game.net/login?mode=gay)

Simple as!

Link to comment
Share on other sites

A few tips, removing ".php" or any part from a URL doesn't make your website any more "professional looking" or anything for that matter, it just proves YOU are not proud of the fact that, indeed, you use PHP, the mother language of your game.

And also, you can redirect the "*.php" pages, to "*", with the exact same thing you used, to in fact, remove it in the first place.

Link to comment
Share on other sites

A few tips, removing ".php" or any part from a URL doesn't make your website any more "professional looking" or anything for that matter, it just proves YOU are not proud of the fact that, indeed, you use PHP, the mother language of your game.

And also, you can redirect the "*.php" pages, to "*", with the exact same thing you used, to in fact, remove it in the first place.

In your opinion.

Unless you are sun-fearing, you wouldn't be proud of a programming language.

I have no idea what your last line means.

All I'm posting is a few lines of code to paste into a file, that means you can forget about your file extensions.

In my opinion and alot of others, it makes the website look more professional and more interesting

Link to comment
Share on other sites

Having file extensions or not or using query strings or not will not really change how professional a website will look like. I had a chat the other day with some people and they was trying to convince me to hide query string by making some fake path and filename, when I asked why? They answered well it looks better, it's for the SEO, looks more professional and something like "I will not go to a website which use querystrings and don't have a nice URL". Somehow the discussion stopped when I asked if they use google as google uses querystrings.

Now, honestly, how much a website look professional or not, DOES NOT depends on the URL. Actually most people don't even watch the URL line and it doesn't have any impact about visits, search engines or whatever else. This is so true, that I still have a lot of question on my own website asking what do I use to make the game, odd the url state clearly a "nbase.php", I would then think that people know that this .php file means it's using PHP under, right? Well they don't look at it. Don't even answer me that the 2% "web developers" (random number) out there do know and you are doing it for those, as whatever small percent of web developers exists don't make the market.

If you remove the extensions, fine, you do it for you as you find it more cool to not see the URL, but don't expect it will actually have any real impact out there. Spend more time on the content of your website, the look of your pages, the usability, etc. That will have lot more effects and this is what makes a website professional or not, not the URL.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...