Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support > "yget"

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-24-2007, 09:36 PM
Pligg Donor
 
Join Date: Feb 2007
Posts: 66
Thanks: 9
Thanked 1 Time in 1 Post
Can't vote with "www" in url name?

I am discovering that in the yget template, possibly all pligg templates that a user cannot vote when they type in "www." before the url. If they just type in the domain name alone it is not a problem.

When I go to admin/configure/location_installed and add "www." to the base url it breaks the site.

Is anyone else discovering this?
Reply With Quote
  #2 (permalink)  
Old 02-24-2007, 09:39 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
you're supposed to add http://www. to the base URL. If users can't vote just rename htaccess.default to .htaccess
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 02-24-2007, 09:51 PM
Pligg Donor
 
Join Date: Feb 2007
Posts: 66
Thanks: 9
Thanked 1 Time in 1 Post
Sorry, I don't quite get what you mean? I see the .htaccess.default file, am I suppose to modify the script at all? Do I just rename it or do I need to move it somewhere? The site is location in a sub-directory.

In admin/configure/location_installed, if I add "www." to the base url it breaks the php template on the site. Do I need to add "http://www." - is that the problem? By default it just had the base url (domain name without the www.)
Reply With Quote
  #4 (permalink)  
Old 02-24-2007, 09:56 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
make sure the value in location installed has http://www. unless your domain is supposed to be used without it.

Since you are installed in a sub-folder open htaccess.default and find RewriteBase / and change it to RewriteBase /name_of_subfolder. Save it and upload it back to the server. Then rename it from htaccess.default to .htaccess
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
The Following User Says Thank You to kbeeveer46 For This Useful Post:
  #5 (permalink)  
Old 02-24-2007, 10:06 PM
Casual Pligger
 
Join Date: Feb 2007
Posts: 30
Thanks: 2
Thanked 3 Times in 2 Posts
Hi, I'm still having this problem. I did as you suggested and renamed htaccess.default to .htaccess for all my Pigg sites but this has done nothing so far. I've noticed how other Pligg sites refresh to http://www.domain.com, but mine just stays http://domain.com anyway.

Please take a look at Avoidinglife.com (Pligg 9.0) or Diggdex.com (Pligg 9.1) if you get a chance. Both have info.php. Neither is in a subfolder on their respective domains. They are however in subfolders of the primary domain on my shared hosting account (silversow.com), but I wouldn't imagine this is the issue. Could that be the issue?
__________________
Avoidinglife.com - Expat Community
Diggdex.com - Pligg site for Digg-like sites
Reply With Quote
  #6 (permalink)  
Old 02-24-2007, 10:49 PM
Pligg Donor
 
Join Date: Feb 2007
Posts: 66
Thanks: 9
Thanked 1 Time in 1 Post
kbeeveer, first of all I appreciate your rapid response. Second, you fixed the problem but it now broke it the other way. Now when someone types in the domain without the "www." they can no longer vote. I don't have the coding talent of many of you but I would think (in theory) that an and/or statement would need to be inserted somewhere to not care if the "www." is there or not.

Many users access websites differently. I for one, usually never use the "www." but apparently many do. The Pligg software will have to take this into consideration.

Thanks in advance.
Reply With Quote
  #7 (permalink)  
Old 02-25-2007, 10:15 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,218
Thanks: 64
Thanked 207 Times in 148 Posts
does you .htaccess file have these lines

## 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 #####
__________________
Anatomy of the Pligg template Help needed
Reply With Quote
  #8 (permalink)  
Old 02-25-2007, 11:39 AM
Pligg Donor
 
Join Date: Feb 2007
Posts: 66
Thanks: 9
Thanked 1 Time in 1 Post
Yes it does and it is uncommented but a user still can't vote when they type in the ural without the "www." since making the change above.

Last edited by Sinsinnati; 02-25-2007 at 11:42 AM..
Reply With Quote
  #9 (permalink)  
Old 02-26-2007, 02:49 AM
Constant Pligger
Pligg Version: 9.8
Pligg Template: garx mod
 
Join Date: Oct 2006
Location: Poland
Posts: 134
Thanks: 11
Thanked 6 Times in 5 Posts
quick fix


step 1. set your site base to adress without www

step 2. modify .htaccess

replace

Quote:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^\/?(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Quote:
# Fix trailing slash problem
RewriteRule ^([^\.]+[^/])$ http://infoneo.pl/$1/ [R=301,L]
# Remove www., always.
RewriteCond %{HTTP_HOST} ^www\.infoneo\.pl$ [NC]
RewriteRule ^(.*)$ http://infoneo.pl/$1 [R=301,L]
infoneo and infoneo.pl change to Your site url adress
Reply With Quote
The Following 2 Users Say Thank You to daone For This Useful Post:
  #10 (permalink)  
Old 02-26-2007, 11:12 PM
Pligg Donor
 
Join Date: Feb 2007
Posts: 66
Thanks: 9
Thanked 1 Time in 1 Post
Thank you daone, that redirection worked. I don't know why the other redirection didn't work.
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Change the Voting System to Vote For/Vote Against davidlgj General Help 0 10-01-2008 04:42 AM
Example vote button with Vote down? coreyvf General Help 0 09-23-2008 01:51 PM
External Vote Button (EVB) Yankidank Modification Tutorials 59 07-24-2008 07:51 PM
A third vote option? Vote, bury and neutral? VLJ Modification Tutorials 5 03-23-2008 10:42 PM
Vote button links to story page after voted canadaka Suggestions 1 04-02-2007 11:12 AM


Search Engine Friendly URLs by vBSEO 3.2.0