PDA

View Full Version : How To Remove Category from Post URL?



seekyt
03-01-2012, 07:02 PM
I think that this has been asked before but I can't seem to find the thread, and I don't know if it has been answered.

Essentially, I want to use categories, and I'd like category pages to still be accessible, i.e., mysite.com/category/art/

However, if I post a page in the "Art" category, I don't want the url to be: mysite.com/art/post-title/

Instead, I want the Post URL to just be: mysite.com/post-title/

Can anyone tell me how to do this in Hotaru? Thanks!


EDIT: I Forgot to mention, I don't want to just redirect every page using htaccess - that is not the solution I'm looking for.

frytec
03-01-2012, 07:17 PM
hi seekyt, i asked that before,
http://forums.hotarucms.org/showthread.php?1744-How-do-i-change-the-FRIENDLY-URLS
it looked a little complex for me, so i gave up.
if you able to do that, pls let me know.

seekyt
03-01-2012, 08:14 PM
I actually can't find the function anywhere in Categories.php, Submit.php or Bookmarking.php. I've also checked the pagehandling lib but I didn't find it there either.

I think it would be easy to do this, but I'm just not sure where that URL function is set.

PuckRobin
03-03-2012, 05:01 AM
It is in method "url" of libs/PageHandling.php

But as I wrote before, I believe this will cause problems. If your concern is about SEO, why don't you just consider such a structure:

http://example.com/1/post-title

Here 1 is ID of the category.

seekyt
03-04-2012, 01:10 AM
Thanks PuckRobin! I don't think categories will be too bad for SEO as long as I use Friendly URLs. I'll just keep them and stop obsessing about every little thing.