Working on a site with EE 2.5.1, so maybe this can only be resolved with an upgrade...

I have set the "Category URL Title in Links?" to "yes" in Global Channel Preferences. The site does output example.com/category/actual-category-name, but it is also outputting example.com/index.php/category/C5. How do I stop the /index.php/category/C5 links from being active?


  • This likely has to do with how you're generating your category links in your templates. Can you post the template code you're using to create these links in each instance? – Derek Hogue Aug 12 '15 at 19:04
  • {exp:channel:categories style="linear" category_group="2"} <li><a href="{path='solutions/index'}">{category_name}</a></li> {/exp:channel:categories} This outputs the category name, nowhere do we instruct it to use the category number, yet there are pages indexed with the category number. – shotgunflat Aug 14 '15 at 13:16
  • "pages indexed" ... do you mean by Google? – Derek Hogue Aug 14 '15 at 15:52
  • Yes, they are indexed by Google. But you only see them when you "include results similar to these pages." The client is the one who found them initially, I do not see links to these pages, but often, Google seems to index a bunch of "ghost" pages (this is a slightly different matter) from my EE sites. – shotgunflat Aug 17 '15 at 13:41

If you don' mind the pages being 'active' in the system, but want to get rid of them from the crawlers ect, perhaps a .htaccess solution will suit?

I'm thinking of a sort of rewrite rule, something like this that will pick up bad formatted URL's and direct to the 404 page. as long as your 404 page sends the right status header crawlers wont index them.

RewriteRule ^category/C([0-9]+)? /404 [L]

Thats an example, but you'll need to experiment, and of course direct them to wherever your 404 page is.

  • Thanks! I'd still like to know how they got created in the first place, but will definitely get rid of them with .htaccess. – shotgunflat Aug 21 '15 at 18:28
  • They will be the default category router. EE has a default URL schema (if thats the word for it), which shows its roots as a blog based structure! Check this out jamessmith.co.uk/images/ExpressionEngine_url_schematic.png as it goes a long way to understanding the history! – Blatant Aug 24 '15 at 9:06
  • Happy to help :) if this answer helped please do mark it as the answer, help others with a simiilar problem find the help they need! – Blatant Aug 26 '15 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.