Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Closed Thread
.htaccess and WordPress
Old 11-12-2009, 12:35 PM .htaccess and WordPress
johniman7's Avatar
President, JLI Media

Posts: 965
Name: John Irving
Trades: 0
I am trying to get the www version of my domain to be used, and only the www.

The site is http://www.john-irving.net/

Here is the code I usually use in my .htaccess on my static sites to force the WWW version...

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
This next bit is what is currently in my .htacces file for my blog. (The commented lines are what wordpress created.)

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{HTTP_HOST} !^www\.john-irving\.net [NC]
RewriteRule ^(.*)$ http://www.john-irving.net/$1 [R=301,L] 



# RewriteEngine On
# RewriteBase /
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule . /index.php [L]
If you visit my site you will see that it is somehow in an infinite loop moving from the www to non www versions.

Is there a problem with my .htaccess or is this an issue with hosting setup? How do you think I could fix this? Thanks, John
__________________
Cheers, John Irving: My Blog
JLI Media:
Please login or register to view this content. Registration is FREE
| Website Development (Link Coming Soon!)
johniman7 is offline
View Public Profile Visit johniman7's homepage!
 
 
Register now for full access!
Old 11-12-2009, 03:03 PM Re: .htaccess and WordPress
webwest's Avatar
Experienced Talker

Posts: 42
Name: Dan Whims
Location: Los Angeles, CA
Trades: 0
If you just let Wordpress write the htaccess file you should be good. Comment out the other stuff (robots etc) and see what happens.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

One-stop Web Development Shop since 1995
webwest is offline
View Public Profile Visit webwest's homepage!
 
Old 11-12-2009, 04:55 PM Re: .htaccess and WordPress
johniman7's Avatar
President, JLI Media

Posts: 965
Name: John Irving
Trades: 0
That is how I have it now, but as you can see it is displaying the non WWW version and only the non WWW version. (Even if you type in www.john-irving.net it redirects to the non www)
__________________
Cheers, John Irving: My Blog
JLI Media:
Please login or register to view this content. Registration is FREE
| Website Development (Link Coming Soon!)
johniman7 is offline
View Public Profile Visit johniman7's homepage!
 
Old 11-12-2009, 10:02 PM Re: .htaccess and WordPress
johniman7's Avatar
President, JLI Media

Posts: 965
Name: John Irving
Trades: 0
Really? Wow, this spam problem needs some fixing.
__________________
Cheers, John Irving: My Blog
JLI Media:
Please login or register to view this content. Registration is FREE
| Website Development (Link Coming Soon!)
johniman7 is offline
View Public Profile Visit johniman7's homepage!
 
Old 11-13-2009, 12:30 AM Re: .htaccess and WordPress
Extreme Talker

Posts: 167
Name: Jilesh
Trades: 0
If you need to work your site with WWW also then please make sure that you have added CNAME record for www in your DNS editor zone.
__________________

Please login or register to view this content. Registration is FREE

ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
thewebhostingdi is offline
View Public Profile
 
Closed Thread     « Reply to .htaccess and WordPress
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.83412 seconds with 12 queries