|
|
Sponsor: Teen Forums |
|
![]() |
|||
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
Tutorials |
| Post a tutorial that you think others can benefit from |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
In this tutorial I will be showing you how you can setup a simple php page navigation system. By “navigation system” I mean a script that allows you to move between pages without having to edit loads of files. For example, if you want to edit a link when you have loads of html pages you have to go through them all and edit all the pages. This can take hours, but with this system you can simple edit one file and all that work is done for you. Ok, let’s get on with the tutorial. First of all we need an index.php page, this will contain all the information/image you want your core site to have, by saying “core” site I mean the information/images that will be on EVERY page of your site. Note: Please do NOT include any content on this page, this will be included later on.
Once you have your index.php setup, then this is where the script gets installed into your website. Simply, find the place you want your content to be and insert the following code (If you’re using Dreamweaver make sure your in code view): PHP Code:
PHP Code:
PHP Code:
To do this, just add the following code to a “.htaccess” file: RewriteEngine On RewriteRule ^/$ /?page=home [L] That will make your links appear as the following: Home Page = http://yourdomain.com/home.html Error Page = http://yourdomain.com/error.html Contact Us Page = http://yourdomain.com/contactus.html Thank you for reading this tutorial, if you have any questions then please email me :), Thank you.
__________________
Kriip Media - Kriip.com - All you web dev needs Last edited by Scotteh : November 7th, 2007 at 08:26 PM. |
|
#9
|
||||
|
||||
|
Great Tutorial Scott.
I will indeed use it. :)
__________________
|
|
#13
|
|||
|
|||
|
Thanks, fantastic tut but the .htaccess doesn't work on my site
www.animeomnitude.com Any one know why? |