Forum Moderators: coopster
Not a programmer, but a marketer so I could use some advice!
I having a site built using PHP and MySQL to target individual searches.
So my question is - how many dynamic elements on a page can the SE spider before giving up? Will mod rewrites help this issue? Are there any other work-arounds?
Thanks in advance!
I don't totally understand what you mean by that.
do you mean variables in the url? like
example.com/index.php?var1=value&var2=value2
or do you mean actual parts of the page that are generated from a database or some such?
this doesn't matter since the user/bot has no idea it is dynamic, it is only html that is served from the request
I am guessing the first scenario since you asked about mod_rewrite. Yes mod_rewrite can help. No params in your urls is always best, the lower the number of params, the better they do.
I use this -
$file=eregi_replace($_SERVER['SERVER_NAME'], "", $_SERVER['PHP_SELF']);
$var=explode("/", $file);
$url_page = $var[1] ;
$affiliate_num = $var[3] ;
$url_cat = $var[4] ;//repnaming header_ID
$cat_page_id = $var[5] ;//part 2 of cat series
the url going to that page would look something like this-
/a_folder_name_or not/1directory.php/2/3/2//37///
each value between the /s gets converted to a variable because of the way Apache iterates through a url
To a spider or a browser, it doesn't have a clue that those numbers don't represent folder names.
And they also make for shorter urls too. /3/2/ is much better than?$ffiliate_num =3, url_cat=2
I've been using that for a long time, but I think the search engines are doing better now than they used to at following dynamic links but I haven't seen any risk to using this system and it will work with any SE
I usually place the code in a separate php page and then just require() or include() it. I like doing it that way more than placing the code in the actual page as it never fails there comes a time to add a new var to the url. With an include you only need to change the one page.
You can also create multiple forms of the code, each calling different variable or probably even variables within it like
If ($var[2]==y){
$affiliate_num = $var[3] ;}
else
{
$test_num = $var[3] ;
}
I haven't tried the last one - I just thought of it. Looks pretty handy actually.
You can also leave the slots empty as in /3/3/////
The values in the empties are still set though
Just want to make sure I've clearly stated what I'm trying to do.
I'd like to have a page that uses PHP/MySQL to draw in, from a database, headlines, content and graphics relative to the search the user performs. I will have hundreds of different headlines, graphics, etc. Can spiders read this type of page? Will I be penalized? Is there a limit to the number of items I can draw onto one page before being penalized?
Thanks!