Forum Moderators: coopster

Message Too Old, No Replies

How do they do that?

from folder/scrip.php?1 to folder/1/

         

hanuman

9:29 am on Jul 29, 2003 (gmt 0)

10+ Year Member



Greetings all;

I hope this is the right forum to post this question. Here is my problem. I have a Hugh site with over 200K of documents. We add 20-50 documents a day which is high content material.

Our main page ranks in goggle quite high PR6. Now here is the problem.

We were facing the need to hierarchy organize our article library. We created a yahoo like face using PHP where we can list our library content in the appropriate category.

Goggle has crawled our site and indexed the newly added articles.

Assume – goggle follows dynamic links.

Problem – the directory pages has no rank whatsoever and the articles themselves dropped to PR1 from PR3, The main directory page, which is listed in DMOZ kept its original PR.

I was thinking that if we use server rewrite commands and mask the urls from

http://www.mydomain.com/directory/script.php?id=category_number
to

http://www.mydomain.com/directory/category_number/

Goggle will rank those pages. So my question is: can some one assist me with the how2do or point me to an available script that does that job?

Thanks
H

[edited by: engine at 9:38 am (utc) on July 29, 2003]
[edit reason] de-linked [/edit]

Nick_W

9:35 am on Jul 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here ya go.... [sitepoint.com]

Nick

daisho

3:01 pm on Aug 2, 2003 (gmt 0)

10+ Year Member



They didn't cover the mod_rewrite method that I'm so fond of :)

saoi_jp

2:50 pm on Aug 5, 2003 (gmt 0)

10+ Year Member



I like "Method 3: The ForceType Directive"

Bit of a helpful hint:

Say you're doing it this way:
www.domain.com/article/3
So the "3" is the id of the article to show on the page.

In the code you've got:
$uri_array = explode("/", $REQUEST_URI);
$article_number = $uri_array[2];
And in the example, $article_number is equal to 3.

If you want to make the url look more meaningful for humans, you can extend your URLs a bit:
www.domain.com/article/3/short-title.html
(and just ignore $uri_array[3], which is "short-title.html").

Slade

3:06 pm on Aug 5, 2003 (gmt 0)

10+ Year Member



I think that the explode function coupled with a simple mod_rewrite would be the easiest. I'm just thinking it through in my head and it's a heck of a lot cleaner than what I built rebuilding the fusebox code.

Use the site search here, or at google, and look up: search engine friendly mod_rewrite

Just one of many examples on this board: [webmasterworld.com...]

edit:

Seeing that link written out reminds me...

For newbies reading this, the link above looks like it's to a real file. It's not. I'm not sure what BestBBS is written in, bit it sure ain't static HTML.

jamie

5:55 pm on Aug 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think that the explode function coupled with a simple mod_rewrite

hi slade,

why the simple mod_rewrite? surely just an explode on the path_info (request_uri) is enough?

i have rewritten parts of our site to use just that and have no need of mod_rewrite. google is already spidering them, so it definitely works.

i'm just curious as to why you'd use both :-)

cheers