I have set up a new template group which is going to provide templates for an ajax call made with the jQuery plugin ‘Magnific Popup’.
The URL structure will look like:
/ajax/{name}/{id}
I have set the ‘segments required’ option to ‘yes’ in the Template Route Manager. It seems to be working, but when any of the segments are missing, it just shows a blank page, rather than a 404. Why? Can I set this somewhere to show a 404?
Bonus points: limit this route to only ajax requests, and show a 404 for any normal get requests. (can’t see any easy way of doing this either- is there a plugin perhaps?)
Thanks.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.