Forum Moderators: coopster

Message Too Old, No Replies

Problem with Web Directory Script

Search Engines treates the same thing differently

         

outrun

4:43 pm on Sep 20, 2004 (gmt 0)

10+ Year Member



I wrote a web directory script awhile back and I just realised that I made a mistake. The problem is the Directory Script creates Search engine friendly URLS like so ://mydircectory.com/Category/Sub_Category/ but unfortunately My Site Map created urls like so ://mydircectory.com/Category/Sub_Category without the trailing slash, So I fixed it promptly.

Now I was just checking SERPS and PR and I see that they are both treated differently, and very eratically some with trailing slash PR 0 or grey taking away the slash gives me a PR, and some without the trailing slash PR 0 or grey putting a slash on and it has PR.

Is there anyway to detect the no without the trailing slash at the end of the url before headers so I can send a 301 code to the url with the slash at the end?

Thank for your help.

regards,
Mark.

mincklerstraat

4:59 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try $_SERVER['REQUEST_URI'] or $_SERVER['PHP_SELF']; if(!preg_match('#/$#', $_SERVER['REQUEST_URI'])) header( ..you know, the rest of the 301 stuff);
or something along those lines.

outrun

11:10 pm on Sep 20, 2004 (gmt 0)

10+ Year Member



Thanks mincklerstraat for putting me on the right track.

regards,
Mark