Is there a HTACCESS string that stops duplicate pages?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Is there a HTACCESS string that stops duplicate pages?

Post by Celauran »

There's the proxy flag.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Is there a HTACCESS string that stops duplicate pages?

Post by simonmlewis »

That line in HTACCESS is what is putting / at the end of Prod, Cat and Sub URLs.
If I go to a Product page wtihout the /, it throws a 404. If I go to it with a /, it works.
Is there a script I can use in HTACCESS which will force a / in all prod, cat and subcat urls only?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Is there a HTACCESS string that stops duplicate pages?

Post by simonmlewis »

Hi.

We have decided to go without the slashes, for many reasons.

But we do have some minor queries. In Webmasters if the uRL has for example:

/clearance-sales&order=title%20ASC, it's a hyperlink that orders the results by title.

The Robots stops Google caching/seeing these, but brings it up as a "warning", but not as an error.
Is this bad???

If we did it like this:
/clearance-sales/order/titleasc, and I used the value of titleasc in a query to order by title ASC, that would work, but is it going to mean some pages could be "duplicate". For example, if a page had just 15 items on it, then ordering it would still have the same content (though in a different order).

Is that bad?

Trying to establish best way to "order" pages for the consumer without upsetting Search Engine crawlers.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Is there a HTACCESS string that stops duplicate pages?

Post by Celauran »

How many pages are going to have 15 or fewer items? I'm no SEO expert, but it sounds like you might be worrying about edge cases.
Post Reply