One little part of htaccess rewrites not working. Help!

Register an Account
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 04-21-2008, 08:01 PM
joehunk's Avatar
Casual Pligger
 
Join Date: Oct 2007
Posts: 66
I think i used the same code. It happened to my site that when the url is came from a search engine like google or yahoo and the url is not having www the vote function is not working. The solution i made is to redirect all url without www to www dot mysite dot com. If you experienced it to your site, here is the rewrite codes.

RewriteRule ^index\.php$ http://yoursite.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^yoursite\.com$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
Reply With Quote
  #12 (permalink)  
Old 05-03-2009, 11:25 PM
New Pligger
 
Join Date: May 2009
Posts: 5
Quote:
Originally Posted by joehunk View Post
I think i used the same code. It happened to my site that when the url is came from a search engine like google or yahoo and the url is not having www the vote function is not working. The solution i made is to redirect all url without www to www dot mysite dot com. If you experienced it to your site, here is the rewrite codes.

RewriteRule ^index\.php$ eCommerce Hosting [R=301,L]
RewriteCond %{HTTP_HOST} ^yoursite\.com$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
hey- i'm sort of new to Pligg, but I really want a site with http://domain.com (as opposed to http://www.domain.com)...

Is there a way to add lines to my .htaccess file to do this (essentially the opposite of what was described earlier here)... and is it going to mess up things further down the line?

Thanks for any info!
Reply With Quote
  #13 (permalink)  
Old 05-04-2009, 12:25 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Quote:
Originally Posted by vincentwest View Post
hey- i'm sort of new to Pligg, but I really want a site with http://domain.com (as opposed to http://www.domain.com)...

Is there a way to add lines to my .htaccess file to do this (essentially the opposite of what was described earlier here)... and is it going to mess up things further down the line?

Thanks for any info!
I had to make these changes to get it working on a http://localhost install. Open .htaccess and change:
Code:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
to:

Code:
RewriteCond %{HTTP_HOST} !^
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #14 (permalink)  
Old 05-04-2009, 01:38 AM
New Pligger
 
Join Date: May 2009
Posts: 5
Quote:
Originally Posted by Yankidank View Post
I had to make these changes to get it working on a http://localhost install. Open .htaccess and change:
Code:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
to:

Code:
RewriteCond %{HTTP_HOST} !^
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Thank you! (And apologies for cross-posting essentially the same issue).
Reply With Quote
  #15 (permalink)  
Old 05-26-2009, 04:53 PM
New Pligger
 
Join Date: Sep 2008
Posts: 6
I noticed that on the NSV, theres one or more rewrites not working.

here is one of them:

## Pages
RewriteRule ^about/?$ page.php?page=about
RewriteRule ^static/([^/]+)/?$ page.php?page=$1 [L]
Reply With Quote
  #16 (permalink)  
Old 06-05-2009, 03:31 AM
New Pligger
Pligg Version: 1.0
Pligg Template: Edited Wistie
 
Join Date: Dec 2008
Posts: 16
Quote:
Originally Posted by lacloi View Post
I noticed that on the NSV, theres one or more rewrites not working.

here is one of them:

## Pages
RewriteRule ^about/?$ page.php?page=about
RewriteRule ^static/([^/]+)/?$ page.php?page=$1 [L]

Please anyone help me above two rewrite are not working... i am using pligg 1.0 rc 5...
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg 1.0 RC4 Category Order Is Not Working argh2xxx Questions and Comments 4 04-08-2009 11:05 AM
Version 9.7 - URLMethod 2 not working for some links tglk Questions and Comments 1 01-04-2008 01:10 AM
make friendly, url method 2 aaalmost working schakal Questions and Comments 2 07-29-2007 04: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