You are here: Re: Redirecting URL ID's using PHP « All PHP « IT news, forums, messages
Re: Redirecting URL ID's using PHP

Posted by Michael Fesser on 06/16/07 18:25

..oO(Sebastiaan 'CrashandDie' Lauwers)

>Rik wrote:
>
>> On a small site, fine (keep in mind the penalties from search engines
>> for duplicate content though). A correct approach, especially for bigger
>> sites, would be a MOVED PERMANENTLY redirect though: no duplicate
>> content, legacy code, problems with relative resources etc. For logging
>> hits it would also be preferable, and what's more: search engines
>> recognize permanent redirects for what they are (well, at least Google
>> does last time I checked), so you don't have to earn your position for
>> the new url all over again.
>
>I agree, but I had in mind the recurrent problem you get with "new"
>coders that is to header ("Location:"); the whole website into oblivion
>just because it looks nice...
>
>The guy doesn't even know to write a conditional statement, you really
>think he's into checking his search engine ranking ? I seriously doubt that.

He asked for a redirect and got a correct answer. He doesn't gave enough
informations about why he wants it, so all you can do is guess.

>> If possibly, I'd opt for the webserver itself to handle this instead of
>> PHP though, preferably in the configuration, if not possible at least in
>> a .htaccess file.
>
>Or just don't care ? I mean, I've never had to maintain a website top10
>of certain keywords in google, so I don't give a lot

If all you have to maintain is a little hobby site, then the world
couldn't care less. But there are people who want to make money with
their site, and in many cases a good SE ranking can be a very important
issue in the whole game.

>and people who
>have outdated bookmarks just don't visit the site all too often

If the site structure changes (a bad idea in general, but not always
avoidable), then you have to take care to not break incoming links.
Ignoring that and letting people run into 404s is just a sign that you
don't know what you're doing and don't care about your customers.

>or just
>specific contents, and that's the kind of user I want to have, so what
>if they don't get what they want ??

They leave. The competitor is right next door.

>Oh and btw, just the for record, if he'd just get used to naming his
>variables correctly, maybe he wouldn't have needed to check if there was
>a p=12 ? Just ignore the damn thing, as it isn't something he wants.

With properly designed URLs there wouldn't be a ?p=12 at all, but that's
another story.

>> To state 'just include the correct file...(if you're not fine) you coded
>> the website like an idiot..' is clearly ignorant on so many levels it
>> doesn't dignify an answer.
>
>Of course it is ignorant, and so what ? header ("Location:") are a waste
> of time and resources on most website, because they are used
>improperly, this is one of the biggest reasons...

I'm sure you can post some examples, how they're used improperly on most
websites?

>An include will always, ALWAYS, be faster and less resources consuming
>than a header ("Location:");, but you already knew that didn't you ?

That's not the point. And actually - what resources does a redirect
waste? Some hundred bytes network traffic and a second script call on
the server. That's not what I would call a "waste".

Micha

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация