Making multiple urls point to same page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dougan778
Forum Newbie
Posts: 1
Joined: Wed Apr 13, 2011 12:02 pm

Making multiple urls point to same page

Post by dougan778 »

Hey everybody,

I'm a professional programmer who has a lot of experience in programming, but virtually none when it comes to setting up a webpage. I've been writing a php webpage to remedy that lack of experience. I have what is probably a very basic question...

I have a page (mypage.php) that generates content dynamically. Currently that content is determined by url query (http://www.mydomain.com/mypage.php?dataid=23). However, It seems like getting individual pages registered by search engines would require me to not have that url query in there. I've been looking at how various forums handle the urls to posts that I see in google results. They seem to always be formatted like this: http://motorbicycling.com/f50/motorcycl ... 28703.html (hover over link to see the actual path, the forum post has shortened it) with the page name being "[arbitrarykeywordname]-[id].html" Assuming that these are php-based, you would have to assume that these .html pages are all masks for a php page to generate the content based on that id.

How do I do this on my webpage, so I can have http://www.mydomain.com/my-dynamic-page-23.html generate dynamic content the same way http://www.mydomain.com/mypage.php?dataid=23 does? Is this something in the PHP language, or something that I need to configure with my web host service? If it's not a php thing, could you point me toward how to set this up outside of php?

Thanks!
danwguy
Forum Contributor
Posts: 256
Joined: Wed Nov 17, 2010 1:09 pm
Location: San Diego, CA

Re: Making multiple urls point to same page

Post by danwguy »

Post Reply