For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > August 2005 > mod_rewrite









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mod_rewrite
Octavian Rasnita

2005-08-23, 6:56 pm

Hi,

I have read that Google doesn't like the links that have too many variables
in them like ?id=...&id2=...&id3=... and so on.

I would like to use mod_rewrite in order to be able to use nice looking
links like http://www.site.com/val1/val2/val3/val4.html

Is there a better way to get the variables from those URLS than splitting
the PATH_INFO environment variable?

Thanks.

Teddy


Joshua Colson

2005-08-23, 6:56 pm

On Tue, 2005-08-23 at 20:40 +0300, Octavian Rasnita wrote:
> Hi,
>
> I have read that Google doesn't like the links that have too many variables
> in them like ?id=...&id2=...&id3=... and so on.
>
> I would like to use mod_rewrite in order to be able to use nice looking
> links like http://www.site.com/val1/val2/val3/val4.html
>
> Is there a better way to get the variables from those URLS than splitting
> the PATH_INFO environment variable?


That is the whole point of using mod_rewrite. You write a rule that will
internally rewrite the URL http://www.site.com/val1/val2/val3/val4.html
to something like
http://www.site.com/perl-bin/script...=val3&var4=val4

Then you have access to all of them via CGI and Google is happy with the
link.

HTH

--
Joshua Colson <jcolson@giant.com>
Sr. Systems Administrator
Giant Industries, Inc
P: (480) 585-8714
F: (480) 502-6641

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com