EllisLab text mark
Advanced Search
     
Odd problem with broken URLs and no headers
Posted: 19 March 2012 08:08 AM
Joined: 2009-02-20
192 posts

Having an odd problem with EE URLs!

Normal stat of play are URL’s like this:

http://www.domain.com/template_group/template/url_title/

http://www.domain.com/template_group/c/category_name/ 

Using conditionals in “template” easy to deal with requiring entries and 404’s.

However, due to some errant markup in some sites linking in, URLs like the following are being hit where the anchor text is truncated but the active link is also directing towards the truncated URL:

http://www.domain.com/template_group/.../url_title/ 

The url_title is valid, but the “template” is replaced by ‘...’ so this URL is processed by template/group/index rather than the “template”. As a result, EE returns the markup but with no headers so nothing is rendered even though the source code shows the markup.

What’s the best way to go about stopping this happening (without being too specific to the ... case) but still allow regular scenarios to work (including any pagination):

http://www.domain.com/template_group/
http://www.domain.com/template_group/c/category_name/ 
 
Posted: 20 March 2012 10:20 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2009-02-20
192 posts

Was running a little slow yesterday. It was a simple:

(segment_2!=="" && segment_2!=="c"

Wish there was a way without using a conditional in the template though.