Has anyone got Friendly Urls (Url Method 2) working?

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2006, 09:44 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
A few people here are having the same problem trying to get Friendly Urls working. Choosing Url Method 2 seems to correctly set static, user friendly urls for internal links (ie: /story/storytitle) but these links generate 404 errors so Url Method 2 can't be used.

Is this a configuration problem on our end or are there are still problems that need to be ironed out in the code before Url Method 2 can be used?

Also ... this thread from August mentions a problem with Pligg's static url system keeping each story at 3 different urls which google defines as spam. Has this been resolved?

I think this is a top priority for several users (I am holding off on launching a site until i can find a solution) because of the importance static urls play in being properly indexed by search engines. So any info would be greatly appreciated.





Once there are some definitive answers on how to get Frienldy Urls working I am happy to add them to the wiki: Friendly Urls and Url Method
Reply With Quote
  #2 (permalink)  
Old 11-05-2006, 09:52 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
URL method 2 relies on your .htaccess file. Pligg gives you one to work with but it may need some more work. You don't have to wait for someone else to find a solution for you before you launch your site. Launch it with URL method 1 and then change it to 2 when you can get it working.
Reply With Quote
  #3 (permalink)  
Old 11-06-2006, 01:18 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
Is there any way to get Pligg to only use Friendly urls for stories and categories and the published and queued pages and leave the rest of the site as dynamic urls?

MediaWiki sort of works like this so that log in pages etc. still use dynamic urls. This allows for a simple 2 line .htaccess modification to get Friendly Urls to work and no additional maintenance of the .htaccess file as you add supporting pages to the site.
Reply With Quote
  #4 (permalink)  
Old 03-04-2008, 10:07 AM
New Pligger
 
Join Date: Feb 2008
Posts: 10
nobody has an answer
Reply With Quote
  #5 (permalink)  
Old 03-04-2008, 10:55 AM
New Pligger
 
Join Date: Feb 2008
Posts: 10
I got them working on Verschiet.be and accept Donations

Last edited by seolinks; 03-04-2008 at 11:01 AM.
Reply With Quote
  #6 (permalink)  
Old 03-05-2008, 05:22 AM
Pligg Donor
Pligg Version: 9.9
 
Join Date: Jan 2008
Location: London and Glasgow
Posts: 10
I'm running 9.9.0 and its still not clear to me if anyone has URL Method 2 working or not. Can anyone say?
Reply With Quote
  #7 (permalink)  
Old 03-05-2008, 07:44 AM
New Pligger
 
Join Date: Feb 2008
Posts: 1
well i cant them to work too :/ i read somewhere that its mod_rewrite problem but since im using custum php.ini im prety shure it cant be from that :S i edited correctly the htacces and still no succes .. if any1 can help .. pls do it
Reply With Quote
  #8 (permalink)  
Old 03-24-2008, 03:49 PM
New Pligger
Pligg Version: 9.9
Pligg Template: czNet
 
Join Date: Apr 2007
Location: USA
Posts: 15
Did you add following code to htaccess?

RewriteRule ^(all|news|album|single|dvd%2Cmovie|etc)/([^/]+)/?$ story.php?title=$2 [L]
RewriteRule ^(all|news|album|single|dvd%2Cmovie|etc)/?$ ?category=$1 [L]

you should add codes which you can find under category management.
Reply With Quote
  #9 (permalink)  
Old 04-20-2008, 07:53 PM
Casual Pligger
 
Join Date: Apr 2008
Posts: 48
The code above doesn't work for me, mostly because in 9.9.0 ALL links go to URL Method 2. I use the code below, it may be sloppy but it works fine. Note: This code is super temporary, the way the code is written for pligg currently makes this task difficult (especially since upgrades will probably break this code.) However, it should work fine for 9.9.0. USE AT OWN RISK.

Check here for urlMethod 2 Wiki

#start

RewriteEngine On

#categories
RewriteRule ^category/(.*)$ index.php?category=$1 [L]
RewriteRule ^category/(.*)$ upcoming.php?category=$1 [L]

#admin function from story
RewriteRule ^story/(.*)/edit/$ editlink.php?id=$1 [L]
RewriteRule ^story/(.*)/modify/main/$ linkadmin.php?id=$1&action=main [L]

#stories various rules to cover multiple configs. (friendlyURL config...)
RewriteRule ^story/title/(.*)$ story.php?title=$1 [L]
RewriteRule ^story/title/(.*)/$ story.php?title=$1 [L]
RewriteRule ^(.*)/(.*)/$ story.php?title=$2&category=$1 [L]

#random story
RewriteRule ^story/(.*)$ story.php?id=$1 [L]

#upcoming main and sorting
RewriteRule ^upcoming$ upcoming.php [L]
RewriteRule ^upcoming/(.*)/$ upcoming.php?part=upcoming&order=$1 [L]
RewriteRule ^upcoming/(.*)/category/(.*)$ upcoming.php?part=upcoming&order=$1&category=$2 [L]

#published main and sorting
RewriteRule ^published$ index.php [L]
RewriteRule ^published/(.*)/$ index.php?part=$1 [L]
RewriteRule ^published/(.*)/category/(.*)$ index.php?part=$1&category=$2 [L]

#misc
RewriteRule ^live$ live.php [L]
RewriteRule ^admin$ admin_index.php [L]
RewriteRule ^topusers$ topusers.php [L]
RewriteRule ^submit$ submit.php [L]
RewriteRule ^rss$ rss.php [L]

#outgoing
RewriteRule ^out/(.*)$ out.php?title=$1 [L]

#tags
RewriteRule ^tagcloud$ cloud.php [L]
RewriteRule ^tag/(.*)$ search.php?search=$1&tag=true [L]
RewriteRule ^tag/range/(.*)$ cloud.php?range=$1 [L]

RewriteRule ^user$ user.php [L]
RewriteRule ^user/view/(.*)/login/(.*)$ user.php?login=$2&view=$1 [L]
RewriteRule ^user/view/profile/(.*)$ user.php?login=$1 [L]

#sitemap module rewrites
RewriteRule ^sitemapindex.xml module.php?module=xml_sitemaps_show_sitemap [L]
RewriteRule ^sitemap-([0-9a-z]+).xml module.php?module=xml_sitemaps_show_sitemap&i=$1 [L]

#end

I may have missed some pages depending on the modules and your own configuration. (for example, there is not Adding Friends or Private Messenging support in the above code, but could be added easily.) Also, it is possible I missed rules, because pligg has different urls for items depending on configs and pligg version.

Hope it helps somebody.

Last edited by na3s; 04-20-2008 at 10:46 PM.
Reply With Quote
  #10 (permalink)  
Old 04-22-2008, 04:27 AM
New Pligger
Pligg Version: 9.9
 
Join Date: Apr 2008
Location: Barcelona, Spain
Posts: 4
Hi:

I don't get the url 2 method working and am also waiting to solve it in order to get my website active. I want Google to index well my pages so I need this htaccess trick.

As I said in another post, I found that if you change one letter of the RewriteRule command, it works. For instance:

RewriteRule ^live/?$ live.php
with http://www.mydomain.com/live
doesn't work, 404 error (page not found).

But
RewriteRule ^livp/?$ live.php
with http://www.mydomain.com/livp
Works and executes well live.php

And
RewriteRule ^liv/?$ live.php
with http://www.mydomain.com/liv
triggers a 500 error(internal error)

I don't understand the reason why "live" doesn't work and "livp" works. Where could the system keep these words in order to fail in the first and work well in the second? I will appreciate very much if someone can enlighten this matter. Thanks.

Antonio
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Friendly URL's for stories And (error - Oops, what you're looking for isn't here!) roor Questions and Comments 6 07-12-2009 12:54 PM
Friendly urls not working WebDesignGoldmine Questions and Comments 6 06-21-2008 04:46 AM
URL Method Yankidank Wiki Articles 4 03-24-2008 06:43 AM
Friendly URLs not working keithadler Questions and Comments 2 07-30-2007 07:32 AM
make friendly, url method 2 aaalmost working schakal Questions and Comments 2 07-29-2007 03:46 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