Help - Search - Members - Calendar
Full Version: Url Without File Extensions
Zymic Webmaster Forums > Web Design & Development > General Web Design Discussion
Gibbons
I want to achieve the following:

http://www.domain.com/about.php

to become

http://www.domain.com/about


Could someone please provide me with the necessary coding.
Thanks very much. rolleyes.gif
Jack
You need to use htaccess and modrewrite properties, perhaps this will help: http://corz.org/serv/tricks/htaccess2.php
Gibbons
Thanks for the help Jack. For those who wish to know how i managed to do this, i put the following code into my .htaccess file:

Options +MultiViews -Indexes

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(([^./]+)+)/?$ $1.php [L]
dtechlord
how do you create a .htaccess file???

i would like to do that to my site.
Banjo
Just write your code in a notepad file. Then save as (filenamehere).htaccess

Eg

hello.htaccess

you may need to click all files instead of .txt in the save bit.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.