How to remove the word "category" in the URL

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 04-08-2009, 12:40 AM
New Pligger
Pligg Version: 1.0
 
Join Date: Mar 2008
Posts: 11
The tutarial of how to Remove the word category from Pligg’s category URLs is correct for pligg 9.9. But when I do the same in Pligg 1.0 RC4, I could still see categories in the published news urls? For example: www.pligg.com/category/internet/goodmovies, I can visit www.pligg.com/internet/goodmovies. I know the .htaccess file is right. Could you tell me how to modify html1php, smartyvariables.php, upcoming.php in Pligg 1.0 RC4?

Last edited by cnbiyi; 04-08-2009 at 12:54 AM.
Reply With Quote
  #2 (permalink)  
Old 04-08-2009, 01:00 AM
Donor
 
Join Date: Jun 2007
Posts: 289
Delete "category" word from Category URL

open ./libs/html1.php

find
Code:
If ($x == "maincategory") {return my_pligg_base."/category/" . $var1;}
change to
Code:
If ($x == "maincategory") {return my_pligg_base."/" . $var1;}
open .htaccess
find
Code:
RewriteRule ^category/([^/]+)/?$ index.php?category=$1 [L]
and delete it

Delete "category" word from Story URL

open ./libs/html1.php

find
Code:
		If ($x == "storycattitle") {return my_pligg_base."/category/" . $var1 . "/" . $var2 ."/";}}
change to
Code:
		If ($x == "storycattitle") {return my_pligg_base."/" . $var1 . "/" . $var2 ."/";}
open .htaccess
find
Code:
RewriteRule ^category/([^/]+)/([^/]+)/?$ story.php?title=$2 [L]
and delete it
Reply With Quote
  #3 (permalink)  
Old 04-08-2009, 02:01 AM
New Pligger
Pligg Version: 1.0
 
Join Date: Mar 2008
Posts: 11
I have reinstalled Pligg 1.0 RC4. After modifing html1.php, .htaccess, I still see the word category on my website. TechHr, you're a great person. Will you help me agian? I see you are doing very well on www.techhr.com. TechHr, I would like to pay your money if you help me remove the world category in Pligg 1.0 RC4. I have try my best to solve the problem for a few months.

Last edited by cnbiyi; 04-08-2009 at 02:27 AM.
Reply With Quote
  #4 (permalink)  
Old 04-11-2009, 11:32 AM
Donor
Pligg Version: 1.0
Pligg Template: default
 
Join Date: Dec 2007
Posts: 52
Tried your fix and although it did remove the word category, when clicking on a link i get the following error
"The page you were looking for doesn't exist!

It may have been removed or you may have arrived here by using a bad URL"

I am using RC4, any ideas?
Is there another file that needs to be changed.
I cleared the cache and cleared my cookies, tried everything
Reply With Quote
  #5 (permalink)  
Old 04-14-2009, 12:11 AM
Donor
 
Join Date: Jun 2007
Posts: 289
@pliggrich

If you want to remove "category" you MUST do both
and delete BOTH

Code:
RewriteRule ^category/([^/]+)/?$ index.php?category=$1 [L]
RewriteRule ^category/([^/]+)/([^/]+)/?$ story.php?title=$2 [L]
If you delete only one some link on homepage will give 404
Reply With Quote
  #6 (permalink)  
Old 04-16-2009, 04:43 PM
Donor
Pligg Version: 1.0
Pligg Template: default
 
Join Date: Dec 2007
Posts: 52
I deleted both, I followed the instructions above to the letter
Reply With Quote
  #7 (permalink)  
Old 04-16-2009, 04:58 PM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
I did this a while ago for dcvacationsource.com, I think the only 2 files you need to modify are /libs/html1.php and .htaccess. I remember it being a pain, so it might be more than those files but it is possible.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #8 (permalink)  
Old 04-17-2009, 06:34 AM
Donor
 
Join Date: Jun 2007
Posts: 289
Sorry that I can't help you more but I'm using this technique on all my pligg site and it's working perfectly. You can see example pligg sites on my signature. My sites no have word "category" both in category url and story url. All I did is just edit html1.php and .htaccess as I said above
Reply With Quote
  #9 (permalink)  
Old 04-20-2009, 11:28 PM
New Pligger
 
Join Date: Mar 2007
Posts: 25
Hi, I also have Pligg v.1 RC4 that I just downloaded tonight. I also followed the instructions to a tee and I'm also getting "The page you were looking for doesn't exist"

I went back and retried and still the same page errors. So, I'm assuming it has to be another file or files to change for this to happen.
Reply With Quote
  #10 (permalink)  
Old 04-22-2009, 12:04 AM
Donor
 
Join Date: Jun 2007
Posts: 289
I just read Yankidank's notice

And see my pligg sites, Remove word "Category" worked in both category url and story url EXCEPT it currently breaks the sort feature.
Reply With Quote
Reply

Tags
category, url method 2

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I remove the word "Powered By Pligg" on the footer? cekedis Questions and Comments 13 08-12-2011 05:00 PM
Pligg Tutorial: How to Remove the word category from Pligg’s category URL’s pliggedit Questions and Comments 6 09-30-2010 08:56 AM
Paid Help - Make Categories Lowercase and Remove "category" within URL trueMarketing Questions and Comments 12 04-22-2009 12:24 PM
How to remove "category" in url link (SVN r384+URL Method2) Techkr Questions and Comments 5 04-07-2009 04:51 PM
How Do I Remove The Word "Category" from URL? Loz07 Questions and Comments 5 07-03-2008 04:48 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development