Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
how to remove file extension in the url?
Old 04-19-2010, 12:45 PM how to remove file extension in the url?
Novice Talker

Posts: 6
Name: Reginald nillas
Trades: 0
how to remove file extension in the URL? like for example site.com/link.php how to make it appear like site.com/link. I heard about .htacess but i don't know how..
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
dacoda is offline
Reply With Quote
View Public Profile Visit dacoda's homepage!
 
 
Register now for full access!
Old 04-19-2010, 01:15 PM Re: how to remove file extension in the url?
Plexihost's Avatar
Extreme Talker

Posts: 241
Trades: 0
In your .htaccess file:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
__________________
HostMantis
Please login or register to view this content. Registration is FREE

Shared • Reseller • 24/7/365 Support • Instant Activation
CloudLinux • Softaculous • Fantastico • FFMpeg • PHP 5.3
Plexihost is offline
Reply With Quote
View Public Profile Visit Plexihost's homepage!
 
Old 04-19-2010, 01:19 PM Re: how to remove file extension in the url?
Plexihost's Avatar
Extreme Talker

Posts: 241
Trades: 0
Quote:
Originally Posted by Plexihost View Post
In your .htaccess file:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
"$1.php" assuming you are using .php

If your pages are .html, you would use "$1.html" and so on.
__________________
HostMantis
Please login or register to view this content. Registration is FREE

Shared • Reseller • 24/7/365 Support • Instant Activation
CloudLinux • Softaculous • Fantastico • FFMpeg • PHP 5.3

Last edited by Plexihost; 04-19-2010 at 01:24 PM..
Plexihost is offline
Reply With Quote
View Public Profile Visit Plexihost's homepage!
 
Old 04-19-2010, 03:50 PM Re: how to remove file extension in the url?
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Or create a directory called link and have an index.html inside it?

Maybe im miss understanding the question?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 04-21-2010, 05:33 AM Re: how to remove file extension in the url?
casius's Avatar
Super Talker

Posts: 129
Trades: 0
He wants that the link.html would be treated as directory so that is the only way to play with .htaccess
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
casius is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how to remove file extension in the url?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.70066 seconds with 12 queries