Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » Running WordPress » Web Hosting for WordPress »

[SOLVED] www to non-www redirect not working?


  #1  
Old Jul 18, 2009, 04:22 AM
jankph
 
93 posts · Jul 2009
ATA 3.6.4 and WP 3.1
My site used to be on wordpress.com with a non-www domain. Now, after moving to wordpress.org, I have this www in front, and I am trying to do a 301 redirect as in http://forum.bytesforall.com/showthread.php?t=1052, but it doesn't work.

This is how the .htaccess file looks like today:
--------------------
# Use PHP5 as default
AddHandler application/x-httpd-php5 .php

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
----------------------

How is it supposed to look like after I have added the www to non-www redirect?
  #2  
Old Jul 18, 2009, 04:38 AM
smcrjc
 
3 posts · Jul 2009
Hmm, this is the code I use in my .htaccess file to redirect:

Code:
## Redirect www to no-www:
 RewriteEngine On
 RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
 RewriteRule ^(.*)$ http://%1/$1 [R=301,L,NE]
I'm by no means an expert, but this works for me--you might give it a shot.
  #3  
Old Jul 18, 2009, 06:57 AM
jankph
 
93 posts · Jul 2009
ATA 3.6.4 and WP 3.1
Thanks, but I'm kind of afraid to mess up the WordPress thingie that is there now. I have no idea what it actually does. I don't want to change anything before I'm certain of what I'm doing.

EDIT

I followed the instructions here: http://www.webweaver.nu/html-tips/web-redirection.shtml
making my htacces file like this
----------------
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^example\.com
RewriteRule (.*) http://example.com/$1 [R=301,L]
----------------
Replacing the 'example' with my domain name, but all it does is making the browser go into a loop. I can make it redirect to any domain I want by replacing the 'example' with other domains, I simply cannot redirect it to myself.

Last edited by jankph; Jul 18, 2009 at 01:21 PM.
  #4  
Old Jul 20, 2009, 06:18 AM
jankph
 
93 posts · Jul 2009
ATA 3.6.4 and WP 3.1
Not solved, but given up. I just let it be the way it is.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Redirect Loop" Issue When Clicking ANY blog link!!?? River2Horses Atahualpa 3 Wordpress theme 5 Sep 29, 2010 03:47 PM
public_html vs. www thetravelchronicle Forum How-To 1 Jun 4, 2009 04:11 PM
[SOLVED] How to do a redirect? Shepherd Jim Web Hosting for WordPress 3 Apr 18, 2009 10:12 AM
[SOLVED] Missing my &quot;www&quot;?? Shepherd Jim Web Hosting for WordPress 10 Apr 5, 2009 09:28 AM
Header feed-links to sidebar? + redirect pages? net-prophet RSS, Feeds & Subscribing 3 Feb 8, 2009 03:05 PM


All times are GMT -6. The time now is 12:13 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.