I have a php script, which creates urls like this: domain.com/model/sunny-leone-133.html domain.com/model/stoya-2.html domain.com/model/kagney-linn-karter-14.html I want all of them to appear as something like this: domain.com/model/sunny-leone The number on the end are needed for database lookups, so I guess they would be there, but now visible to the visitors, if this can be done this way. I would then want to crate an entry page, something like this: domain.com/go and this could be entered with something like this: domain.com/go?m=sunny-leone domain.com/go?m=stoya domain.com/go?m=kagney-linn-karter and this would be redirecting to the specific model pages. I can work on that part, I am just not sure how to do the first, rewriting part, and if this can work this way. All model names would be unique. Thanks.
You posted this on another forum and you have changed your requirements a bit. You do not need a numeric ID on the URL. The identifying portion of the URL is called a "slug" and as long as you have a field in your database, you can use the slug to identify the post. In your database where you have the performer information, just add another field called "slug" and inside that field you put your identifying information and query based on that, not the ID number. So your slugs are "sunny-leone", "kagney-linn-karter", and so forth and when you retrieve data, you query on the slug (make sure to put a unique constraint on it and index it for faster performance). You could do it like this: yoursite.tld/sunny-leone OR yoursite.tld/model/sunny-leone And you would write your htaccess rewrite code to reflect which version you want to use and redirect the request to the appropriate file which would then query the database based on the slug (sunny-leone). There is no need to have a .html extension on your URLs and if you are using mod_rewrite, it is stupid to do that anyway.