Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-21-2007, 02:06 AM
New Pligger
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
URL Method 2 Problems

Domain: http://www.topcarnews.com

Host: hostgator (sharedplan) mod_rewrite is enabled

Fresh Install of Pligg 9.1


When I copy the .htaccess file over to the server the site locks up and gives an error.

Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@topcarnews.aljitech.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at topcarnews.com Port 80


htaccess file
PHP Code:
##### Gzip Begin #####
## To enable Gzip and decrease the load times of your Pligg site
## change /home/path/to to your absolute server path and remove the two # from both lines
php_value auto_prepend_file /home/snoopgst/public_html/topcarnews/begin_gzip.php
php_value auto_append_file 
/home/snoopgst/public_html/topcarnews/end_gzip.php

<files *.js.gz>
AddType "text/javascript" .gz
AddEncoding gzip 
.gz
</files>
##### Gzip End #####

##### Re-directing Begin #####
Options +Indexes +FollowSymlinks
RewriteEngine on
## If Pligg is installed in a subfolder, change the below line to RewriteBase /name-of-subfolder
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*index.php HTTP/

## Remove these two lines if you have a sub-domain like  http://ashdigg.pligg.com  or http://localhost
## Keep if your site it like   http://www.pligg.com
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^/?(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
##### Re-directing End #####

##### You can find the below lines pre-made for you in the category management section of the admin panel ######
RewriteRule ^(all|General|Videos|Reviews|Tech|Racing|AlternativeFuel|Hybrids|)/([a-zA-Z0-9-]+)/?$ story.php?title=$[L]
RewriteRule ^(all|General|Videos|Reviews|Tech|Racing|AlternativeFuel|Hybrids|)/?$ ?category=$[L
#####

##### URL Method 2 ("Clean" URLs) Begin #####
RewriteRule ^story/([0-9]+)/?$ story.php?id=$[L]
RewriteRule ^story/title/([a-zA-Z0-9-]+)/?$ story.php?title=$[L]
RewriteRule ^recommend/([a-zA-Z0-9-]+)/?$ recommend.php?id=$[L]
RewriteRule ^category/([a-zA-Z0-9]+)/?$ index.php?category=$[L]
RewriteRule ^queued/category/([a-zA-Z0-9]+)/?$ upcoming.php?category=$[L]
RewriteRule ^discarded/category/([a-zA-Z0-9]+)/?$ discarded.php?category=$[L]
RewriteRule ^upcoming/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ upcoming.php?part=$1&order=$2
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/?$ user.php
RewriteRule 
^inbox/?$ user.php?view=inbox
RewriteRule 
^user/view/([a-zA-Z0-9-]+)/?$ user.php?view=$1
RewriteRule 
^user/view/([a-zA-Z0-9+]+)/([a-zA-Z0-9+]+)/?$ user.php?view=$1&login=$2
RewriteRule 
^user/view/([a-zA-Z0-9+]+)/login/([a-zA-Z0-9+]+)/?$ user.php?view=$1&login=$2
RewriteRule 
^index/?$ index.php
RewriteRule 
^index/([a-zA-Z0-9-]+)/?$ index.php?part=$1
RewriteRule 
^index/([a-zA-Z0-9-]+)/&category=([a-zA-Z0-9-]+)/?$ index.php?part=$1&category=$2
RewriteRule 
^upcoming/upcoming/([a-zA-Z0-9-]+)/&category=([a-zA-Z0-9-]+)/?$ upcoming.php?part=upcoming&order=$1&category=$2
RewriteRule 
^search/([a-zA-Z0-9]+)/?$ search.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 
^topusers/?$ topusers.php
RewriteRule 
^about/([a-zA-Z0-9-]+)/?$ faq-$1.php
RewriteRule 
^upcoming/?$ upcoming.php
RewriteRule 
^submit/?$ submit.php
RewriteRule 
^rss2/?$ rss2.php
RewriteRule 
^rss2/([a-zA-Z0-9-]+)/?$ rss2.php?status=$1
RewriteRule 
^rss2/category/([a-zA-Z0-9-]+)/?$ rss2.php?category=$1
RewriteRule 
^rss2/search/([a-zA-Z0-9-]+)/?$ rss2.php?search=$1
RewriteRule 
^rss2/user/([a-zA-Z0-9-]+)/?$ rss2.php?user=$1
RewriteRule 
^rss2/user/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ userrss2.php?user=$1&status=$2
RewriteRule 
^trackback/([0-9]+)/?$ trackback.php?id=$
RewriteRule 
^profile/?$ profile.php
RewriteRule 
^admin/?$ admin_index.php
RewriteRule 
^tagcloud/?$ cloud.php
RewriteRule 
^tagcloud/range/([0-9]+)/?$ cloud.php?range=$[L]
RewriteRule ^tag/(.+)/?$ search.php?search=$1&tag=true [QSA,NC,L]
RewriteRule ^live/?$ live.php
RewriteRule 
^out/([^/]+)/?$ out.php?title=$[L]
RewriteRule ^settemplate/?$ settemplate.php
RewriteRule 
^settemplate/([^/]+)/?$ settemplate.php?template=$1
RewriteRule 
^comments/?$ comments.php
RewriteRule 
^published/?$ published.php
RewriteRule 
^unpublished/?$ unpublished.php
RewriteRule 
^logout/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ login.php?op=logout&return=$1/$2
RewriteRule 
^page/([^/]+)/?$ index.php?page=$[L]
RewriteRule ^page/([^/]+)/category/([^/]+)/?$ index.php?page=$1&category=$[L]
RewriteRule ^page/([^/]+)/([^/]+)category/([^/]+)/?$ index.php?page=$1&part=$2&category=$[L]
RewriteRule ^page/upcoming/([0-9]+)/?$ upcoming.php?page=$[L]
RewriteRule ^page/upcoming/([^/]+)/category/([^/]+)/?$ upcoming.php?page=$1&category=$[L]
RewriteRule ^page/upcoming/([^/]+)/upcoming/([^/]+)/?$ upcoming.php?page=$1&part=upcoming&order=$[L]
RewriteRule ^page/upcoming/([^/]+)/upcoming=([^/]+)category/([^/]+)/?$ upcoming.php?page=$1&part=upcoming&order=$2&category=$[L]
RewriteRule ^topusers/page/([^/]+)/?$ topusers.php?page=$[L]
RewriteRule ^topusers/page/([^/]+)/sortby/([^/]+)?$ topusers.php?page=$1&sortby=$[L]
RewriteRule ^comments/page/([^/]+)/?$ comments.php?page=$[L]
RewriteRule ^published/page/([^/]+)/?$ published.php?page=$[L]
RewriteRule ^unpublished/page/([^/]+)/?$ unpublished.php?page=$[L]
RewriteRule ^page/([^/]+)/([^/]+)/?$ index.php?page=$1&part=$[L]
RewriteRule ^page/([^/]+)/range/([^/]+)/?$ ?page=$1&range=$[L]
RewriteRule ^page/([^/]+)/part/([^/]+)/?$ ?page=$1&part=$[L]
RewriteRule ^page/([^/]+)/search/([^/]+)/?$ search.php?page=$1&search=$[QSA,NC,L]
RewriteRule ^page/([^/]+)/([^/]+)/([^/]+)/?$ user.php?page=$1&view=$2&login=$[L]
##### URL Method 2 ("Clean" URLs) End ##### 
Reply With Quote
  #2 (permalink)  
Old 02-21-2007, 02:10 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Internal server error means that your host does not support .htaccess files or there is something inside of the file that it doesn't support. Checking with your host of the only thing you can do
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 02-21-2007, 02:13 AM
New Pligger
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the fast reply.

Hostgator does support .htaccess files. I have another site hosted with them that is using a .htaccess file.

I will have to give them a call and see if they can help.

Thanks
Reply With Quote
  #4 (permalink)  
Old 02-21-2007, 03:22 AM
New Pligger
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
This is what I got from my host.

These are the cause of your error:

auto_prepend_file /home/snoopgst/public_html/topcarnews/begin_gzip.php
auto_append_file /home/snoopgst/public_html/topcarnews/end_gzip.php

these values neeed to be in your php.ini file.

and this AddType directive, needs to be AddHandler
AddType "text/javascript" .gz

Once you make these changes, you should no longer receive those errors.
Reply With Quote
  #5 (permalink)  
Old 02-22-2007, 03:22 AM
New Pligger
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
I sent another email to my host and they suggested that I create a php.ini for the httaccess file. How do I go about doing that?

Quote:
You can create your own php.ini file which overrides some PHP settings. You will need to place a copy of the php.ini file in the same directory as any script that relies on the changed settings.
Thanks
Reply With Quote
  #6 (permalink)  
Old 02-22-2007, 03:24 AM
onelessthang's Avatar
Constant Pligger
 
Join Date: Feb 2007
Location: Dallas, TX - USA
Posts: 120
Thanks: 39
Thanked 32 Times in 16 Posts
Can you show how to change the AddHandler code you mention.

I am hosting at godaddy.com and I have a couple of pligg sites that I am trying to get launched.

1 of the sites was just fine when I cut and pasted in the category change required. When I went to add the category code to the 2nd .htaccess file it gave me the 500 error. All I did was add the code from the category page as I did with the first site.

Thanks,
Onelessthang
Reply With Quote
  #7 (permalink)  
Old 02-23-2007, 10:50 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
onelessthang, are you still getting the error? If so, copy your htaccess file in here and we'll figure out what's wrong.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #8 (permalink)  
Old 02-23-2007, 11:46 PM
onelessthang's Avatar
Constant Pligger
 
Join Date: Feb 2007
Location: Dallas, TX - USA
Posts: 120
Thanks: 39
Thanked 32 Times in 16 Posts
kbeeveer46 -

1st off - You guys rock. I really love pligg. I appreciate you taking the time to help me with this.

Here is the .htaccess file with the category code added.

When I switch it back to the original the site is accessible, but I cannot view my stories due to the change of the categories.

Please let me know what other information I can provide.

Code:
##### Gzip Begin #####
## To enable Gzip and decrease the load times of your Pligg site
## change /home/path/to to your absolute server path and remove the two # from both lines
## php_value auto_prepend_file /home/path/to/begin_gzip.php
## php_value auto_append_file /home/path/to/end_gzip.php



<files *.js.gz>
AddType "text/javascript" .gz
AddEncoding gzip .gz
</files>
##### Gzip End #####

##### Re-directing Begin #####
Options +Indexes +FollowSymlinks
RewriteEngine on
## If Pligg is installed in a subfolder, change the below line to RewriteBase /name-of-subfolder
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/

## Remove these two lines if you have a sub-domain like  http://ashdigg.pligg.com  or http://localhost
## Keep if your site it like   http://www.pligg.com
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^\/?(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
##### Re-directing End #####

##### You can find the below lines pre-made for you in the category management section of the admin panel ######
RewriteRule ^(HaveGood|Insightful|Humor|OddPhotos|BadDead|Bizarre|Hots|QuickArticles|)/([a-zA-Z0-9-]+)/?$ story.php?title=$2 [L]
RewriteRule ^(HaveGood|Insightful|Humor|OddPhotos|BadDead|Bizarre|Hots|QuickArticles|)/?$ ?category=$1 [L]
#####

##### URL Method 2 ("Clean" URLs) Begin #####
RewriteRule ^story/([0-9]+)/?$ story.php?id=$1 [L]
RewriteRule ^story/title/([a-zA-Z0-9-]+)/?$ story.php?title=$1 [L]
RewriteRule ^recommend/([a-zA-Z0-9-]+)/?$ recommend.php?id=$1 [L]
RewriteRule ^category/([a-zA-Z0-9]+)/?$ index.php?category=$1 [L]
RewriteRule ^queued/category/([a-zA-Z0-9]+)/?$ shakeit.php?category=$1 [L]
RewriteRule ^discarded/category/([a-zA-Z0-9]+)/?$ discarded.php?category=$1 [L]
RewriteRule ^shakeit/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ shakeit.php?part=$1&order=$2
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/?$ user.php
RewriteRule ^inbox/?$ user.php?view=inbox
RewriteRule ^user/view/([a-zA-Z0-9-]+)/?$ user.php?view=$1
RewriteRule ^user/view/([a-zA-Z0-9+]+)/([a-zA-Z0-9+]+)/?$ user.php?view=$1&login=$2
RewriteRule ^user/view/([a-zA-Z0-9+]+)/login/([a-zA-Z0-9+]+)/?$ user.php?view=$1&login=$2
RewriteRule ^index/?$ index.php
RewriteRule ^index/([a-zA-Z0-9-]+)/?$ index.php?part=$1
RewriteRule ^index/([a-zA-Z0-9-]+)/&category=([a-zA-Z0-9-]+)/?$ index.php?part=$1&category=$2
RewriteRule ^shakeit/upcoming/([a-zA-Z0-9-]+)/&category=([a-zA-Z0-9-]+)/?$ shakeit.php?part=upcoming&order=$1&category=$2
RewriteRule ^search/([a-zA-Z0-9]+)/?$ search.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 ^topusers/?$ topusers.php
RewriteRule ^about/([a-zA-Z0-9-]+)/?$ faq-$1.php
RewriteRule ^shakeit/?$ shakeit.php
RewriteRule ^submit/?$ submit.php
RewriteRule ^rss2/?$ rss2.php
RewriteRule ^rss2/([a-zA-Z0-9-]+)/?$ rss2.php?status=$1
RewriteRule ^rss2/category/([a-zA-Z0-9-]+)/?$ rss2.php?category=$1
RewriteRule ^rss2/search/([a-zA-Z0-9-]+)/?$ rss2.php?search=$1
RewriteRule ^rss2/user/([a-zA-Z0-9-]+)/?$ rss2.php?user=$1
RewriteRule ^rss2/user/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ userrss2.php?user=$1&status=$2
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/(.+)/?$ search.php?search=$1&tag=true [QSA,NC,L]
RewriteRule ^sneak/?$ sneak.php
RewriteRule ^out/([^/]+)/?$ out.php?title=$1 [L]
RewriteRule ^settemplate/?$ settemplate.php
RewriteRule ^settemplate/([^/]+)/?$ settemplate.php?template=$1
RewriteRule ^comments/?$ comments.php
RewriteRule ^published/?$ published.php
RewriteRule ^unpublished/?$ unpublished.php
RewriteRule ^logout/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ login.php?op=logout&return=$1/$2
RewriteRule ^page/([^/]+)/?$ index.php?page=$1 [L]
RewriteRule ^page/([^/]+)/category/([^/]+)/?$ index.php?page=$1&category=$2 [L]
RewriteRule ^page/([^/]+)/([^/]+)category/([^/]+)/?$ index.php?page=$1&part=$2&category=$3 [L]
RewriteRule ^page/shakeit/([0-9]+)/?$ shakeit.php?page=$1 [L]
RewriteRule ^page/shakeit/([^/]+)/category/([^/]+)/?$ shakeit.php?page=$1&category=$2 [L]
RewriteRule ^page/shakeit/([^/]+)/upcoming/([^/]+)/?$ shakeit.php?page=$1&part=upcoming&order=$2 [L]
RewriteRule ^page/shakeit/([^/]+)/upcoming=([^/]+)category/([^/]+)/?$ shakeit.php?page=$1&part=upcoming&order=$2&category=$3 [L]
RewriteRule ^topusers/page/([^/]+)/?$ topusers.php?page=$1 [L]
RewriteRule ^topusers/page/([^/]+)/sortby/([^/]+)?$ topusers.php?page=$1&sortby=$2 [L]
RewriteRule ^comments/page/([^/]+)/?$ comments.php?page=$1 [L]
RewriteRule ^published/page/([^/]+)/?$ published.php?page=$1 [L]
RewriteRule ^unpublished/page/([^/]+)/?$ unpublished.php?page=$1 [L]
RewriteRule ^page/([^/]+)/([^/]+)/?$ index.php?page=$1&part=$2 [L]
RewriteRule ^page/([^/]+)/range/([^/]+)/?$ ?page=$1&range=$2 [L]
RewriteRule ^page/([^/]+)/part/([^/]+)/?$ ?page=$1&part=$2 [L]
RewriteRule ^page/([^/]+)/search/([^/]+)/?$ search.php?page=$1&search=$2 [QSA,NC,L]
RewriteRule ^page/([^/]+)/([^/]+)/([^/]+)/?$ user.php?page=$1&view=$2&login=$3 [L]
##### URL Method 2 ("Clean" URLs) End #####
Reply With Quote
  #9 (permalink)  
Old 02-23-2007, 11:50 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Is Pligg installed in a sub-folder? If so, make sure to edit
Code:
RewriteBase /
to
Code:
RewriteBase /your_subfolder
Try removing the | that are highlighted in red
Code:
RewriteRule ^(HaveGood|Insightful|Humor|OddPhotos|BadDead|Bizarre|Hots|QuickArticles|)/([a-zA-Z0-9-]+)/?$ story.php?title=$2 [L]
RewriteRule ^(HaveGood|Insightful|Humor|OddPhotos|BadDead|Bizarre|Hots|QuickArticles|)/?$ ?category=$1 [L]
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote