Forum Moderators: coopster

Message Too Old, No Replies

Search Engine Friendly URLs

Mod Rewrite, Number of dynamic fields

         

coreydavid

4:21 pm on May 4, 2007 (gmt 0)

10+ Year Member



Hi everyone,

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!

jatar_k

8:45 pm on May 4, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> dynamic elements on a page

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.

Minuteman

9:47 pm on May 4, 2007 (gmt 0)

10+ Year Member



if you are on an Apache server-

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

coreydavid

3:47 am on May 5, 2007 (gmt 0)

10+ Year Member



Thanks for the advice!

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!

FiRe

9:45 am on May 5, 2007 (gmt 0)

10+ Year Member



Take a look at [webmasterworld.com...]