- Posts: 1421
- Thank you received: 234
Sending 404 headers (SVN:1660)
11 years 4 months ago - 11 years 4 months ago #1787
by redactie
Sending 404 headers (SVN:1660) was created by redactie
This deals with the situation where a given page has no items to show.
The default behaviour is to redirect using a 301 header to a higher level:
example.com/cat1/cat2 -> example.com/cat1
You can change this behaviour send a 404 header. The page is not redirected and the component re-queries : thus first attempt on SEARCH FOR ( cat1 AND cat2 ) fails so try SEARCH FOR ( cat1) etc
example : demos.affiliatefeeds.nl/shop/Turkije/Ege.html
google webmasters will give you a warning for the tons of 404 this generates. However google mentions in their help that this will not affect your ranking
Warning this feature is experimental and might change in the future!
The default behaviour is to redirect using a 301 header to a higher level:
example.com/cat1/cat2 -> example.com/cat1
You can change this behaviour send a 404 header. The page is not redirected and the component re-queries : thus first attempt on SEARCH FOR ( cat1 AND cat2 ) fails so try SEARCH FOR ( cat1) etc
Code:
#in your xhelpers.php
#you can use any string, it shows above the items
define ('DF_REQUERY','<strong>Nothing found</strong>');
example : demos.affiliatefeeds.nl/shop/Turkije/Ege.html
google webmasters will give you a warning for the tons of 404 this generates. However google mentions in their help that this will not affect your ranking
Warning this feature is experimental and might change in the future!
Last edit: 11 years 4 months ago by redactie.
Please Log in to join the conversation.
Time to create page: 0.446 seconds