WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this Article to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES SUBMIT AN ARTICLE PRINT
Title : Using ForceType For Nicer Page URLs
Categories : Apache, URLs, Web Servers
devarticles
devarticles
Date : 2002-06-06
Grade : 0 of 5 (graded 0 times)
Viewed : 2865
Search : More Articles by devarticles
Action : Grade This Article
Tools : My Favotite Articles


Submit your own code examples 
 


Introduction

One of the things I love about the Apache web server software is that it's so flexible. Its configuration file, httpd.conf, allows you to setup dozens of options that change the way your web server works. My main like about Apache is that you can re-route different document types to different applications/scripting engines. Another thing that gives Apache so much power is its built-in URL look back feature and customisable re-write engine.

By either editing Apache's httpd.conf file or by creating a .htaccess file, we can modify the way Apache works to a certain extent. Combine this with some PHP knowledge and we have the power to add some seriously flexibility to our web sites.

In this article we're going to look at one way to use Apache and PHP to change "ugly" web page URL's into easier to remember, more logical ones. For example, instead of having to use this URL to read about a specific animal:

http://www.mysite.com/animals.php?animalId=5&color=red

... we can use Apache and PHP to setup a page with the following URL:

http://www.mysite.com/animals/pig/red

As I'm sure you'll agree, the latter URL is easier to read and remember. Setting up URL's like this also helps the search engines do their thing and stops certain search engines from rejecting your pages.

To get the most from this article you should have Apache 1.39+ and PHP 4.1+ installed on a web server. I will assume that you're using Linux, but you could just as easily use Windows, Unix, etc.

Read More...









User Authentication With Apache and PHP
Categories : PHP, Web Servers, Apache, Authentication
Authentication 101
Categories : Apache, Web Servers, Authentication
Implementing Sensible 404 Pages With Apache
Categories : Apache, Web Servers, HTTP
Handling 404 Error's With Apache
Categories : Apache, Web Servers
Installing Apache With SSL: The Complete Guide
Categories : Web Servers, Apache
Securing Directories With htaccess
Categories : Apache, Security
Installing Apache Web Server and PHP 4 on Linux
Categories : PHP, Web Browsers, Apache, Linux
Setup and Install Apache with PHP4 as a Dynamic Module (DSO)
Categories : PHP, PHP Configuration, Apache
Ten Things to Do With IIS
Categories : Web Servers, Windows 2000, IIS
How TO Install PHP, Apache and MySQL on Linux or Unix
Categories : PHP, MySQL, Apache, Installation, Beginner Guides
Installing PHP With IIS To Create A Discussion Forum Article URL
Categories : PHP, IIS, Web Servers
Apache, PHP, and PostgreSQL on RedHat Linux
Categories : Apache, PHP, Databases, PostgreSQL, Linux
Installing PHP Under Xitami
Categories : PHP, Web Servers, Xitami
Setup and Install Apache and PHP4 on Windows
Categories : PHP, PHP Configuration, Apache, Windows 2000
Generating One-Time URLs with PHP
Categories : PHP, URLs