![]() |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| ::How to:: Use .htaccess file with Pligg This is just going to be a small tutorial on how to use an .htaccess file with Pligg and what it can do for your Pligg site. 1. There is no support for .htaccess on windows servers e.g. IIS. This has to do with how Windows servers work and is not an issue with Pligg. This tutorial will be biased towards Apache since that's what most people use. 2. Make sure that mod_rewrite is enabled in Apache. If you have access to your Apache httpd.conf file search for LoadModule rewrite_module modules/mod_rewrite.so and make sure there isn't a # in front of it. If there is, remove it and save the file. You will need to restart Apache for this to take effect. If you follow this tutorial and get an error that says "Internal Server Error" or something similar that usually means that mod_rewrite is not enabled. 3. Next rename your htaccess.default file to .htaccess (Note the period in front of it) 4. Now I am going to go through the important things in the .htaccess file that you need to know about a. Pligg uses two methods of gzip compression to decrease page load times. I will talk about the first method which you can enable in your .htaccess file Code: ## 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 b. Code: RewriteBase / Code: RewriteBase /pligg Code: RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^\/?(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] d. Code: RewriteRule ^(all|pligg)/([a-zA-Z0-9-]+)/?$ story.php?title=$2 [L] RewriteRule ^(all|pligg)/?$ ?category=$1 [L] The rest of the htaccess file is for the use of URL method 2 or "clean" urls. For example: www.mydomain.com/search.php?search=technology would change to www.mydomain.com/search/technology Pligg beta 9.0 (9.1 should be working) has quite a few bugs when it comes to using "clean" urls but they have since been fixed and if you would like to have this working on your site then let us know and we can show you how to get the latest SVN code from Sourceforge. Here is a quick tutorial on how to get the latest SVN code: http://www.pligg.com/forum/showpost....92&postcount=2 Here is the article on wikipedia about htaccess http://en.wikipedia.org/wiki/Htaccess If you have any good tips to add to this tutorial let me know.
__________________ I accept donations for my time helping users like you on the forum and IRC. FREE and premium Pligg Web Hosting (NO ads, Includes MySQL, PHP, PHPMyAdmin, and Control Panel) - PM me for discounts on premium packages or if you would like a custom-made package. Paypal accepted. Last edited by kbeeveer46 : 03-01-2007 at 10:44 AM. |
| The Following 8 Users Say Thank You to kbeeveer46 For This Useful Post: | ||
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 3dkiller's .htaccess file | 3dKiller | General Help | 16 | 05-12-2007 05:40 PM |
| Internal Server Error | wagthis | Bug Report | 12 | 01-16-2007 04:20 PM |
| Page titles & breadcrumbs | AshDigg | Core Development | 11 | 06-30-2006 06:35 PM |
| Call for Pligg CSS Redesign | Yankidank | Pligg Templates | 7 | 01-12-2006 08:10 AM |



Linear Mode

