|
jdj329
|
 |
« on: November 25, 2003, 06:44:17 AM » |
|
I've got very good rankings for all my keywords on one site that uses php to generate dynamic pages. What I would like to know is how can I get my dynamic pages listed so that I can get users to exactly what they're looking for without having to go to my main page first. This site is a local county business directory. What I'm trying to do is when they search for the county and say 'contractors', have the dynamic page listed for contractors. I know it's possible because others are doing it...just don't know how PS: Got two more refferals this month  The slogan I use that gets the clicks is "This site is hosted by LUNARPAGES - The best hosting provider on the planet!" And I personally believe that is a true statement  Keep up the good work LunarPages :!:
|
|
|
|
|
Logged
|
James Jackson President - Nacogdoches Association for Civic Virtue
|
|
|
|
steve
|
 |
« Reply #1 on: November 26, 2003, 01:11:23 AM » |
|
I've got very good rankings for all my keywords on one site that uses php to generate dynamic pages. What I would like to know is how can I get my dynamic pages listed so that I can get users to exactly what they're looking for without having to go to my main page first. The trick to making your site tasty to spiders is URL rewriting. If you make all your dynamic function look like static HTML pages, they'll be cataloged. Let's say you have a PHP script that needs a topic keyword, a chapter, and a page number in order to provide the content. RewriteEngine On RewriteRule ^([^/]+)/chapter([^/]+)/([0-9]+)$ script.php?kywd=$1&chapter=$2&page=$3 [L] That would turn a URL like this: http://www.domain.com/foobar/chapter28/115Into this: http://www.domain.com/script.php?kywd=foobar&chapter=28&page=115The slogan I use that gets the clicks is "This site is hosted by LUNARPAGES - The best hosting provider on the planet!" And I personally believe that is a true statement  Keep up the good work LunarPages :!: Flattery will get you everywhere -- thanks much for the kudos.
|
|
|
|
|
Logged
|
|
|
|
|
scanman20
|
 |
« Reply #2 on: November 26, 2003, 06:23:45 AM » |
|
Cool tip Steve. Do you know of any good tutorials on the rewrite rule?
|
|
|
|
|
Logged
|
Even a broken clock is right twice a day. NotOneBit.comMCSE - MCSA - MCP
|
|
|
|
expert_21
|
 |
« Reply #3 on: November 26, 2003, 07:50:03 AM » |
|
is rewrite enabled on lunarpages?
|
|
|
|
|
Logged
|
|
|
|
|
jdj329
|
 |
« Reply #4 on: November 26, 2003, 08:08:47 AM » |
|
THe mod_rewrite code goes in the htaccess file right? Also, what is the actual process that takes place? I change all my dynamic links to the static version and the htaccess file converts them to the dynamic page?
|
|
|
|
|
Logged
|
James Jackson President - Nacogdoches Association for Civic Virtue
|
|
|
|
|
|
steve
|
 |
« Reply #6 on: November 26, 2003, 10:20:15 AM » |
|
is rewrite enabled on lunarpages? Yes it is - you can use the rewrite directives in your local .htaccess files.
|
|
|
|
|
Logged
|
|
|
|
|
steve
|
 |
« Reply #7 on: November 26, 2003, 10:21:30 AM » |
|
Cool tip Steve. Do you know of any good tutorials on the rewrite rule? Try the links Jay provided. I don't think you're going to find one called "Making Sites Tasty" in particular, but it's similar to some of the "My Stuff Has Moved and It's Over Here" rules.
|
|
|
|
|
Logged
|
|
|
|
|
steve
|
 |
« Reply #8 on: November 26, 2003, 10:23:17 AM » |
|
THe mod_rewrite code goes in the htaccess file right? Also, what is the actual process that takes place? I change all my dynamic links to the static version and the htaccess file converts them to the dynamic page? That's exactly right. The static URL remains in the address bar, and the dynamic URL gets run on the sly to generate the page. To the unwary traveller, your entire site appears to be static HTML pages.
|
|
|
|
|
Logged
|
|
|
|
|
KJones
|
 |
« Reply #9 on: November 26, 2003, 07:37:13 PM » |
|
I recently converted my site to PHP... does that mean Google won't add it to search results? The only PHP my site uses is the include statement, I use it to add a header, side bar, and footer. Does Google ignore files ending in .php? If so, is there anything I can do about it?
|
|
|
|
|
Logged
|
"I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the earth." - John F. Kennedy
|
|
|
|
steve
|
 |
« Reply #10 on: November 26, 2003, 07:56:02 PM » |
|
I recently converted my site to PHP... does that mean Google won't add it to search results? The only PHP my site uses is the include statement, I use it to add a header, side bar, and footer. Does Google ignore files ending in .php? If so, is there anything I can do about it? I don't think Google has a problem with the .php extension per se, but rather URLs that employ query strings (the stuff at the end URL after the question mark). Anyone else have a second opinion?
|
|
|
|
|
Logged
|
|
|
|
|
Coon
|
 |
« Reply #11 on: November 26, 2003, 09:41:52 PM » |
|
Google handles sites that end with .php without any problems. As mentioned before, just stay away from session IDs and you should be fine. Google is one of the top engines and .php extensions are one of the least likely things to cause it troubles. 
|
|
|
|
|
Logged
|
|
|
|
|
KJones
|
 |
« Reply #12 on: November 26, 2003, 09:46:08 PM » |
|
That's good to know, thanks guys.
|
|
|
|
|
Logged
|
"I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the earth." - John F. Kennedy
|
|
|
|
|
|
ilikeitraw
|
 |
« Reply #14 on: December 26, 2003, 01:24:47 PM » |
|
i'm trying to accomplish what was explained in this thread, but am having problems.
essentially, I have a URL looking like: ================== /index.php?query=asdf&submit=submit
my .htaccess looks like this ================== RewriteEngine on RewriteRule ^([^/]+)\.html$ index.php?query=$1&submit=submit
.. however, when i access index.php and my form results in a query like: index.php?query=asdf&submit=submit
... i don't see the rewriting happening. any ideas ?
|
|
|
|
|
Logged
|
|
|
|
|