Friendly URL, URL method and htaccess

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-19-2007, 03:57 AM
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
First of all, I am very new to Pligg. And not a programmer either.

But I managed to install Pligg in a subdomain without any hassle, use RSS importer, watched some tutorials etc.

Now I need to fix the Friendly URL issue. Currently, my URLs are in the format
/story.php?title=title-comes-here

How do I get the proper seo-friendly URLs like .story/title-comes-here etc?

Any thread or tutorial on this, or can someone with experience help?

Thanks

Matt
Reply With Quote
  #2 (permalink)  
Old 03-19-2007, 06:13 AM
Casual Pligger
 
Join Date: Feb 2007
Posts: 93
Have you been in the Admin section yet? Tons of goodies in there including 'URL Method' which is what you want.
Reply With Quote
  #3 (permalink)  
Old 03-21-2007, 02:10 AM
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
Yes found URL Method and did it. However, since then, all URLs seem to be redirecting back to the homepage. Do i need to make any change in the htaccess for this to work correctly?
Reply With Quote
  #4 (permalink)  
Old 03-21-2007, 01:00 PM
Casual Pligger
 
Join Date: Feb 2007
Posts: 93
I had the same exact problem but I can't remember exactly how I fixed it. I think it is a combination of settings.

This is how I have mine set up:
'Outgoing' - Enable outgoing links. - False
'Outgoing' - Outgoing Links. - Title
'Story' - Use the story title as link to story's website. - True
'URL method' Value - 2

First though, I would try setting 'Outgoing Links' to 'URL.'

I've made so many changes that eventually made it all work along with a lot of help from Savant that I can't quite remember exactly how it was done.
Reply With Quote
  #5 (permalink)  
Old 03-21-2007, 01:03 PM
Casual Pligger
 
Join Date: Feb 2007
Posts: 93
Also, post your .htaccess file so we can have a look.
Reply With Quote
  #6 (permalink)  
Old 03-22-2007, 01:00 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
1. I have gone back to URL method1. (I am all for proper static URLs with /asas/asas format, but this is what works now.)

2. Enable outgoing links is set to yes.

3. Choose story title as link - True

4. URL Method - original method

5. FriendlyURL is : /story/(story title)/ and /category/(categoryname)/ (But as I am on URL Method1, this is anyway not working now)

5. I have .htaccess to htaccess.default back to get things to work.

In this way, it works perfectly. But my purpose is to get friendlyURLs to work, and thats not happening.

Now, let me rename htaccess.default to .htaccess and make no further changes.
Result: All still works, no problems. But no friendlyURL

Now, I change URLMethod to 2. Result: Every URL now points back to the homepage :-)

Below is the .htaccess file -
-----------------------------------------------

##### 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 ^(all|pligg)/([a-zA-Z0-9-]+)/?$ story.php?title=$2 [L]
RewriteRule ^(all|pligg)/?$ ?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]+)/?$ upcoming.php?category=$1 [L]
RewriteRule ^discarded/category/([a-zA-Z0-9]+)/?$ discarded.php?category=$1 [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=$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 ^live/?$ live.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/upcoming/([0-9]+)/?$ upcoming.php?page=$1 [L]
RewriteRule ^page/upcoming/([^/]+)/category/([^/]+)/?$ upcoming.php?page=$1&category=$2 [L]
RewriteRule ^page/upcoming/([^/]+)/upcoming/([^/]+)/?$ upcoming.php?page=$1&part=upcoming&order=$2 [L]
RewriteRule ^page/upcoming/([^/]+)/upcoming=([^/]+)category/([^/]+)/?$ upcoming.php?page=$1&part=upcoming&order=$2&catego ry=$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
  #7 (permalink)  
Old 03-22-2007, 01:17 PM
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
The URLs are defined in html1.php. Can you attach that file?
Reply With Quote
  #8 (permalink)  
Old 03-22-2007, 01:50 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
here is html1.php

(BTW my site is on a subdomain. The .htaccess said if on a subdomain, delete two lines - that didn't work either)
Attached Files
File Type: php html1.php (28.5 KB, 173 views)
Reply With Quote
  #9 (permalink)  
Old 03-22-2007, 02:23 PM
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
The thing I am confused about is the fact that you say the links redirect you back to your homepage. As far as I am aware, this isn't possible unless the URLs aren't assigned but they are all assigned in your html1 file. Can you provide a link to your site?
Reply With Quote
  #10 (permalink)  
Old 03-23-2007, 01:33 AM
Casual Pligger
 
Join Date: Mar 2007
Posts: 57
Would changing to URLMethod2, friendlyurl and renaming default.htaccess to .htaccess make it happen? I think thats what happened in my case.... Just sent you a PM
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
FIX for gzip compression troubles, no .htaccess gzip compression method required Daniel Questions and Comments 9 06-07-2010 09:06 AM
URL method htaccess argh2xxx Questions and Comments 1 06-18-2009 02:47 PM
why the Friendly URL is not work on story page? ashuma Questions and Comments 5 01-07-2009 01:08 PM
greybox RUL method 2 htaccess problem pliggfreak Questions and Comments 2 06-16-2008 11:16 AM
htaccess: profile links using URL method 2 abcdefgary Questions and Comments 0 03-09-2007 09:22 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