twebman84 Posted August 21, 2012 Share Posted August 21, 2012 Some years ago I found a program that allowed me to do this. I can't find it now. Here's what I am trying to accomplish: I need to create hundreds of PHP web pages that will have only one thing changed in their code, a variable ID that is stored in an Access DB (or in a mySQL DB< I suppose). So that the PHP web page is sort of like this: <?php Some PHP $player = 'uniqueID'; Some HTML ?> Each page will need that uniqueID to be filled with one of the several hundred uniqueIDs in the database. How can I do this? It's sort of like a mail merge, and I know I had a program that did this for me, but can't for the life of me remember what it is. Is there another programmatical way to accomplish this? The key is each PHP web page needs to have a unique URL corresponding to the uniqueID. Thanks Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 21, 2012 Share Posted August 21, 2012 This is so the wrong way to do this sort of thing. You have ONE page that gets the ID from the URL. Google mod rewrite. Quote Link to comment Share on other sites More sharing options...
twebman84 Posted August 21, 2012 Author Share Posted August 21, 2012 Thank you. But if I use mod rewrite, can the URL be http://whatever.com/filename.php ? where filename = the uniqueID? Quote Link to comment Share on other sites More sharing options...
twebman84 Posted August 21, 2012 Author Share Posted August 21, 2012 The reason I ask is that Google still seems to favor pages WITHOUT query strings in their URL. They say they don't, but I haven't seen evidence of that. Currently I am using mod rewrite and the page URLs are like this: http://whatever.com/whatever/?id=uniqueID ... and those pages are getting buried on Google, in fact they aren't even being crawled. Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 21, 2012 Share Posted August 21, 2012 That is the entire purpose of mod rewrite. Did you bother searching for it like I said? Quote Link to comment Share on other sites More sharing options...
twebman84 Posted August 21, 2012 Author Share Posted August 21, 2012 Yes, I have. I apologize for not being as up on this as you are. This is my current HTACESS file: #RewriteCond %{REQUEST_URI} ^/baseball-player/(.*)$ /baseballplayer/?playerid=$1 So the URL looks like this: http://domain.com/baseball-player/?id=uniqueID Those pages aren't showing up AT ALL in Google. No indexing at all. I'd prefer the URL to be: http://domain.com/baseball-player/uniqueID.php Am I crazy? Is this not possible or even preferable? Does Google "crawl" these URLs? If so, HOW? Only if there are links to them? Thanks, and I'd be happy to work with you on this project, because it's wasting a lot of time. I already had one developer work on it and it didn't come out the way it was supposed to. Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 21, 2012 Share Posted August 21, 2012 http://lmgtfy.com/?q=mod_rewrite+pretty+urls First couple of links have the answer. Any of them. You need flags. BTW you don't want /uniqueID.php, you want /username for SEO purposes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.