Jump to content

Website pages question


jason360

Recommended Posts

Hey guys,

 

Just building a site using php.  I would like to know how to create pages without having to make ".php" links for every page.  For example I want to build the site to be as follows:  www.mysite.com/products instead of www.mysite.com/products.php.  (Further example www.mysite.com/products/headphones )

 

An example of what I am looking for is as follows: http://www.starbucks.ca/store-locator

 

Any idea how starbucks is doing this?  It isn't making a separate folder and index for every page is it?

 

Thanks in advance!

 

Jason  8)

Link to comment
https://forums.phpfreaks.com/topic/263337-website-pages-question/
Share on other sites

If all you want to do is omit file extensions then

Options +MultiViews

in a .htaccess is enough. There's also a mod_rewrite solution that's more annoying.

 

If you actually want to change the URLs into something different then "URL rewriting" is what you should be searching for.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.