Website Hosting for Just 20 ForumCoin ~ Advertise on ForumCoin
52 Life Tips Banner
Webmaster forum. Website development, design & management. Graphic design. Blog / Forum Set-up, Management, Admin & News

How To Hide Extension in URL .php .html ,etc

Postby saraali786 » 06 Mar 2015, 10:54

First , Open Your Notepad Editor I Recommend Usinghttp://notepad-plus-plus.org/ and write this code


RewriteEngine On
RewriteBase /htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]


Then Save it as ".htaccess"
Then Upload The File To Your Website Hosting Root
And If You Are Using Godaddy Use This Code



Options -MultiViews
RewriteEngine On
RewriteBase /root_folder_name
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]



Done
  • 0

saraali786
 
Posts: 553
ForumCoin: 252

Re: How To Hide Extension in URL .php .html ,etc

Postby Fergal » 07 Mar 2015, 13:05

Hide Extension in URL .php .html ,etc

What does that actually mean? What is the purpose of the above?
  • 0

User avatar
Fergal
Site Admin
 
Posts: 14,869
Location: Ireland
ForumCoin: 14,861

Re: How To Hide Extension in URL .php .html ,etc

Postby saraali786 » 07 Mar 2015, 17:05

Fergal wrote:
Hide Extension in URL .php .html ,etc

What does that actually mean? What is the purpose of the above?


To make the URLs more user and search engine friendly.
To make the URLs look cleaner
To make URLs easier to type
To make URLs easier to remember
To make URLs more SEO keyword friendly
To be able to change technologies -- if you ever want to move your site from one technology to the other, its easiest to do so without users even knowing if there are no extensions on the URLs
  • 1

saraali786
 
Posts: 553
ForumCoin: 252

Re: How To Hide Extension in URL .php .html ,etc

Postby JordanDD » 08 Mar 2015, 20:36

Fergal, imagine you have a URL called : http://example.com/file.php, with that code you could remove the .php but access to the file easily ! http://example.com/file --> http://example.com/file.php ! Its the same thing, just the extension is removed. Its pretty much more pro !
  • 0

User avatar
JordanDD
 
Posts: 1,433
Location: Québec, Canada
Referrals: 2
ForumCoin: 20

Re: How To Hide Extension in URL .php .html ,etc

Postby Fergal » 09 Mar 2015, 07:56

Thanks for the explanations saraali786 and jordandd, I can see how that would be useful to webmasters.
  • 0

User avatar
Fergal
Site Admin
 
Posts: 14,869
Location: Ireland
ForumCoin: 14,861

Re: How To Hide Extension in URL .php .html ,etc

Postby JordanDD » 10 Mar 2015, 22:28

Yes its pretty useful !Its simple to use and make a big difference on the URL !
  • 0

User avatar
JordanDD
 
Posts: 1,433
Location: Québec, Canada
Referrals: 2
ForumCoin: 20

Re: How To Hide Extension in URL .php .html ,etc

Postby LShun » 09 Apr 2015, 15:00

I agree, the simpler a URL is the easier it is to remember, though some important little words might be missing when you try to recognize the link by a sight :) .
  • 0

User avatar
LShun
 
Posts: 747
Referrals: 8
ForumCoin: 140

Re: How To Hide Extension in URL .php .html ,etc

Postby JordanDD » 10 Apr 2015, 00:54

I am using that function on all websites I create and you easily find files you need when you know which one you are searching for !
  • 0

User avatar
JordanDD
 
Posts: 1,433
Location: Québec, Canada
Referrals: 2
ForumCoin: 20

Re: How To Hide Extension in URL .php .html ,etc

Postby saraali786 » 13 Apr 2015, 12:22

JordanDD wrote:I am using that function on all websites I create and you easily find files you need when you know which one you are searching for !


yes this function can be use for files searching purpose
  • 0

saraali786
 
Posts: 553
ForumCoin: 252

Re: How To Hide Extension in URL .php .html ,etc

Postby JordanDD » 13 Apr 2015, 21:07

saraali786 wrote:
JordanDD wrote:I am using that function on all websites I create and you easily find files you need when you know which one you are searching for !


yes this function can be use for files searching purpose

Removing file extention actually do nothing with search... I was talking about normal searching in a FTP software for example
  • 0

User avatar
JordanDD
 
Posts: 1,433
Location: Québec, Canada
Referrals: 2
ForumCoin: 20

Re: How To Hide Extension in URL .php .html ,etc

Postby Jynuddin » 13 Apr 2015, 21:44

It will help the webmasters or developers most... It make a website different from others...
  • 0

Jynuddin
Banned
 
Posts: 582
Referrals: 1
ForumCoin: 252



Your Ad Here.

Return to Webmaster Questions, Discussion & News



Who is online

Users browsing this forum: Claude [Bot] and 0 guests

Reputation System ©'