I’ve created a dynamic page (page.php) who’s content changes based on the incoming link, specifically by calling a GET on the ID in the URL. So, for example, someone visits www.domain.com/page.php?id=310 and the content on the page changes queries the database and returns results for item 310.

I’m in the process of redesigning a few things and I’m trying to figure out whether there is a way instead to make these URLs more “friendly.” So, instead of it being page.php?id=310 is there a way to create an alias (for lack of a better term) to make the URL more representative of the name of the product?

Any ideas/advice you all have are much appreciated! :)

Recommended Answers

All 4 Replies

apache mod_rewrite, applied in the .htaccess files can display mysite.com/page.php?id=310 as mysite.com/page310.php ,
or any other system you wish to set up
and the urls are 2way, so they can access page310.php as a typed url
the search for instructions would be something like THIS ,

(love that animation, not suggesting any lack of diligence on your part, such searches are easy if you already know what the rewrite module is called, just love that animation)

Your link to online generator is absolutely helpful. I was blur with regex. Big thanks

apache mod_rewrite, applied in the .htaccess files can display mysite.com/page.php?id=310 as mysite.com/page310.php ,
or any other system you wish to set up
and the urls are 2way, so they can access page310.php as a typed url
the search for instructions would be something like THIS ,
(love that animation, not suggesting any lack of diligence on your part, such searches are easy if you already know what the rewrite module is called, just love that animation)

thanks man that did the job for me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.