BaBazinga BaBazinga - 1 year ago 76
HTML Question

Set up proper URL directory structure for web pages

Many websites use the following format for different pages throughout the site.

For example:

The about page URL is:

Currently my about page URL is

The URL looks much cleaner and better using the the folder structure

I just wanted to figure out whats the proper way web developers set this up for their website for other pages.

Do they really make a about folder in the root directory and use a index.php for the about page? So whenever they open the /about/ directory it automatically loads the index.php file for that particular page?

Thanks for any help just trying to use proper etiquette for my site

Answer Source

Not at all.. What we do is to use url rewriting... CHeck this

Feel free to comment if u need help ;)..Coz I have also worked it out in the previous week Create an .htaccess file in the dir you are working on and write:

RewriteEngine On
RewriteRule   ^about/?$   about.php  [NC]
RewriteRule   ^stories/?$   stories.php  [NC] 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download