Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.