Forum Moderators: coopster
For example www.example.com/newsinbrief.php, it would be nice it I could have it as www.example.com/newsinbrief
Is this possible does anyone know how to do it and if so where i could look for the code advise etc.
Any help you could give me would be very much appreciated.
Thanks in advance for any help
Regards
Tim
[edited by: dreamcatcher at 12:10 pm (utc) on Sep. 24, 2007]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]
Either use -
DefaultType application/x-httpd-php
Then you can call pages with no extension i.e. expample.com/mypage
As this tells the server to treat anything without an extension that it recognises as a php page.
or use -
AddType application/x-httpd-php .html
This tells php to parse anything with a .html extension as well as all of its default extensions. With this method you can choose whatever extension you want to use.
i.e. the UK law society use .law extensions to there pages
[edited by: PHP_Chimp at 12:13 pm (utc) on Sep. 24, 2007]
You may well be better going to [webmasterworld.com...] as this question has probably been answered over there.
In brief -
You create a text file called .htaccess. The file name must start with a . so windows may object if you try to create the file.
Place whatever line of code you choose into the htaccess file and upload it to the server. Usually at the very root of your directors as Apache searches all directories from the root up for htaccess files and they work for all directories above there location.
You may need to turn on the rewrite engine first, you may need other options in there to make it work. It depends on the server setup and what the admin allows you to do if you are on a shared server. Also htaccess can kill you site, well make it issue 500 errors, so check that it works before you down your website.