3dkiller's .htaccess file

Register an Account
Pligg Chat Room
Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-23-2006, 01:14 AM
3dKiller's Avatar
Constant Pligger
 
Join Date: Mar 2006
Location: Newport Beach
Posts: 370
Fellow Pliggers,

One of the major problems with Pligg of late has been the absence of a satisfactory .htaccess file. Therefore I have decided to offer a modified version of my own. My sincere hope is that this .htaccess file will solve your problems.

---
Instructions:

Make sure you modify this line in the .htaccess file when adding categories.

> RewriteRule ^(all|pligg|category1|category2|category3)/([a-zA-Z0-9-]+)/?$

Example: if you add a category called 'business', replace 'category1' with 'business'.

> RewriteRule ^(all|pligg|business|category2|category3)/([a-zA-Z0-9-]+)/?$

You can rename/add/delete anything from pligg - category3. You can add as many categories as you want.

Also be sure and change "yourdomainnamehere" to your domain name.

---

I would appreciate your comments.

3dkiller.htaccess.zip

Thanks,

~3d

Last edited by 3dKiller; 06-23-2006 at 01:20 AM.
  #2 (permalink)  
Old 06-23-2006, 05:55 PM
New Pligger
 
Join Date: Jun 2006
Posts: 5
Hey 3dKiller thanks for the reply and welcome.

i just tried your htaccess file and nothing happen,so i am going to install it again see what would happens.

no i am not running it from a sub-directory.

i will let you know my results soon.

thanks again
  #3 (permalink)  
Old 06-23-2006, 08:37 PM
Constant Pligger
 
Join Date: Feb 2006
Posts: 101
Could you include a copy of your htaccess file in the zip that doesnt have the period before it (macs dont display files that start with a period, so i cant see the file).
  #4 (permalink)  
Old 06-23-2006, 09:56 PM
3dKiller's Avatar
Constant Pligger
 
Join Date: Mar 2006
Location: Newport Beach
Posts: 370
Quote:
Originally Posted by gragland
Could you include a copy of your htaccess file in the zip that doesnt have the period before it (macs dont display files that start with a period, so i cant see the file).
Ok, here is the Mac version without the "."

mac.htaccess.rar

~3d
  #5 (permalink)  
Old 06-23-2006, 11:05 PM
Casual Pligger
 
Join Date: May 2006
Posts: 43
So far my categories have been working fine. What exactly does this new .htaccess file fix?
  #6 (permalink)  
Old 06-27-2006, 12:14 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 537
Code:
##### Re-directing Begin #####
Options +Indexes +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
##### Re-directing End #####

##### Friendly URLs Begin #####
Options +Indexes +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^story/([0-9]+)/?$ story.php?id=$1 [L]
RewriteRule ^story/([a-zA-Z0-9-]+)/?$ story.php?title=$1 [L]
RewriteRule ^(all|pligg|category1|category2|category3)/([a-zA-Z0-9-]+)/?$ story.php?title=$2 [L]
RewriteRule ^recommend/([a-zA-Z0-9-]+)/?$ recommend.php?id=$1 [L]
RewriteRule ^category/([a-zA-Z0-9]+)/?$ ?category=$1 [L]
RewriteRule ^category/queued/([a-zA-Z0-9]+)/?$ shakeit.php?category=$1 [L]
RewriteRule ^shakeit/([a-zA-Z0-9]+)/?$ shakeit.php?category=$1 [L]
RewriteRule ^story/([0-9]+)/editcomment/([0-9]+)?$ edit.php?id=$1&commentid=$2
RewriteRule ^story/([0-9]+)/edit/?$ editlink.php?id=$1
RewriteRule ^story/([0-9]+)/modify/([a-z]+)/?$ linkadmin.php?id=$1&action=$2
RewriteRule ^user/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ user.php?login=$1&view=$2
RewriteRule ^user/([a-zA-Z0-9-]+)/?$ user.php?login=$1
RewriteRule ^search/([a-zA-Z0-9-]+)/?$ index.php?search=$1
RewriteRule ^login/?$ login.php
RewriteRule ^login/([a-zA-Z0-9-]+)/?$ login.php?return=$1
RewriteRule ^login/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ login.php?return=$1/$2
RewriteRule ^register/?$ register.php
RewriteRule ^user/?$ user.php
RewriteRule ^topusers/?$ topusers.php
RewriteRule ^topstories/?$ topstories.php
RewriteRule ^about/([a-zA-Z0-9-]+)/?$ faq-$1.php
RewriteRule ^shakeit/?$ shakeit.php
RewriteRule ^submit/?$ submit.php
RewriteRule ^bugreport/?$ bugreport.php
RewriteRule ^rss2/?$ rss2.php
RewriteRule ^rss2/([a-zA-Z0-9-]+)/?$ rss2.php?status=$1
RewriteRule ^trackback/([0-9]+)/?$ trackback.php?id=$1 
RewriteRule ^profile/?$ profile.php
RewriteRule ^admin/?$ admin_index.php
RewriteRule ^tagcloud/?$ cloud.php
RewriteRule ^tagcloud/range/([0-9]+)/?$ cloud.php?range=$1 [L]
RewriteRule ^tag/(.+)/?$ index.php?search=$1&tag=true [QSA,NC,L]
RewriteRule ^sneak/?$ sneak.php
RewriteRule ^pliggadmin/?$ admin_index.php
RewriteRule ^logout/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ login.php?op=logout&return=$1/$2
##### Friendly URLs End #####
Red - these lines can cause problems on some servers, remove if errors occur.
Green - add in all your category names in place of "category1|category2" etc.
Blue - if putting pligg into a sub-directory of a domain, add the path in (eg. if installed in yourdomain.com/pligg - line would read RewriteBase /pligg/)
Purple - optional, helps consolidate google page rank, add in your domain name where required. Doesn't affect friendly urls, therefore entire "Re-directing" section can be deleted if wanted.

Last edited by Simon; 06-27-2006 at 12:21 PM.
  #7 (permalink)  
Old 06-29-2006, 07:40 AM
Casual Pligger
 
Join Date: Jun 2006
Posts: 79
Hey, right on! This totally cleared up the Friendly URL problems I was having. They totally didn't work before, and when I put this .HTACCESS file in my root pligg directory... bam! Thanks a lot guys!
  #8 (permalink)  
Old 06-29-2006, 07:47 AM
Casual Pligger
 
Join Date: Jan 2006
Posts: 65
Humanaught,

Are you running url config 3? Just curious. This sorts out many problems except for the remapping of shakeit url with categories... i still get 404's.

thx
  #9 (permalink)  
Old 06-29-2006, 08:25 PM
Casual Pligger
 
Join Date: Jun 2006
Posts: 79
Hey Can8dn, yeah, I'm getting 404 errors when I vote on any page other than the main index page.

I was using Friendly URL Option 2 and that didn't work at all, then I switched to Option three and then I could vote on the main page, but can't vote no the category or article pages.

Any advice would be fantfrigintastic.
  #10 (permalink)  
Old 06-29-2006, 09:34 PM
Casual Pligger
 
Join Date: Jan 2006
Posts: 65
Ya, I am in the same boat. Even with the modded .htaccess files with cats and various combos of option 1,2,3 on all the URL options. So far the only certain option for me is 1 in both fields. I have goofed around with it enough I reckon and will just sit and wait on it and concentrate on other things now. Wish I could help. Sorry.
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Index.php won't open to install nigelnix Questions and Comments 5 02-18-2010 04:59 PM
Internal Server Error cvcxl Questions and Comments 2 02-29-2008 06:51 PM
::How to:: Use .htaccess file with Pligg kbeeveer46 Questions and Comments 0 01-25-2007 10:16 AM
Internal Server Error wagthis Questions and Comments 12 01-16-2007 05:20 PM


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