Forwarding Issue

Discussion in 'Site & Server Administration' started by airattack111, Jan 16, 2014.

  1. #1
    Hi I'm having an issue with my website forwarding.

    The domain is located at www.bluemoonpresents.com

    It originally used the Joomla CMS, it was then upgraded to Wordpress in a separate directory /web, and should auto forward to /web.

    Although on some computers instead of redirecting to /web it stays on .com/, and the template gets destroyed.

    Any ideas? This was the only section I thought this thread would fit.
     
    Solved! View solution.
    airattack111, Jan 16, 2014 IP
  2. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #2
    At a glance someone is perhaps doing something wrong here... A quick header check is not showing me any redirects at all. Not even www or not..

    HTTP/1.1 200 OK => should be a 301 to /web if that is in fact what you are trying to do here. If I misread that let me know.

    EDIT: Just caught your location. I went to USL and worked as a therapist at a treatment center in Scott for a while. I don't miss the latter too much but I certainly miss the food!
    Nigel
     
    Last edited: Jan 16, 2014
    Nigel Lew, Jan 16, 2014 IP
  3. airattack111

    airattack111 Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    That's cool! I go to ULL, they changed the name... lol

    The problem I'm having is the redirect, on some computers if you go to (bluemoonsaloon.com) it does not forward to /web for some reason. And the template gets destroyed.

    Basically the wordpress installation is under the directory /web. There is nothing under the root folder other than the .htaccess file.

    .htaccess file under root folder code
    RewriteEngine On
    #RewriteCond %{HTTP_HOST} ^(www.)?bluemoonpresents.com$
    #RewriteRule ^(/)?$ web [L]
    
    RewriteCond %{REQUEST_URI} !^web/
    RewriteRule ^(.*)$ web/$1 [L] 
    Code (markup):
    .htaccess file under the /web folder (where main website is located)
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /web/
    #If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index-https.html.gz -f
    RewriteRule ^(.*) "/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index-https.html.gz" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index.html.gz -f
    RewriteRule ^(.*) "/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index.html.gz" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index-https.html -f
    RewriteRule ^(.*) "/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index-https.html" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index.html -f
    RewriteRule ^(.*) "/web/wp-content/cache/supercache/%{SERVER_NAME}/web/$1/index.html" [L]
    </IfModule>
    
    # END WPSuperCache
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /web/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /web/index.php [L]
    </IfModule>
    
    # END WordPress
    
    Code (markup):

    Should I just move the entire website to the root folder? But then if I moved it to the root folder I would have to make /web redirect to the root folder for old links. It is a busy site.. so confusing.
     
    airattack111, Jan 16, 2014 IP
  4. #4
    How long was joomla live in the root folder here? And, how long has wordpress been in /web

    A simpler solution is probably
    but that may miss a few things as well. I am more concerned with what you are about to do with your SEO efforts here than anything else.

    Something is clearly stuffed up here though. You also want to force www one way or the other as well.

    Or perhaps even more simple..
    #Redirect an entire site to a sub folder is what I would have tried first cus its brick simple as well. But you are going to have to force www one way or the other.
    Redirect 301 / http://www.domain.com/subfolder/

    Hope I am not confusing the issue. There are a range of ways to skin this cat. If you have nothing in the root I am sorta stumped why I can see the site there lol..

    Nigel
     
    Last edited: Jan 16, 2014
    Nigel Lew, Jan 16, 2014 IP
  5. airattack111

    airattack111 Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Joomla was in the root folder for years, it is no longer there. Wordpress has been in /web for about 2 months since I took over the website. It's like it's redirecting, but not fully redirecting, hard to explain.
     
    airattack111, Jan 16, 2014 IP
  6. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #6
    Well the last option is worth a shot if you want to salvage your SEO. If you move WP into the root its going to cause a range of 404's which have to dealt with granularly with something like this http://wordpress.org/plugins/redirection/ but that is sort of a last resort.

    N.
     
    Nigel Lew, Jan 16, 2014 IP
  7. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #7
    Always remember to clear the cache in wp-super cache as well.... just thinking out loud.

    N.
     
    Nigel Lew, Jan 16, 2014 IP
  8. airattack111

    airattack111 Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #8
    Cool thanks for all the help, I appreciate it! Going to try a few things and test them out on a few different computers.
     
    airattack111, Jan 16, 2014 IP
  9. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #9
    It seems to have started working here for what its worth.

    HTTP/1.1 301 Moved Permanently => Server => nginx/1.4.4 Date => Fri, 17 Jan 2014 02:36:08

    I would also try the last one because assuming joomla had stuffed up urls or even /index.php that is throwing a 404 so you want to make sure its rerouting the entire root into /web
    Nigel
     
    Nigel Lew, Jan 16, 2014 IP
  10. airattack111

    airattack111 Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #10
    Yeah works for the owner as well, I was confused as to why the site was showing up in the root also.

    I used this code
    RewriteEngine On
    RewriteRule ^$ /web [L]
    Code (markup):
    Was that the last one you were mentioning?
     
    airattack111, Jan 16, 2014 IP
  11. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #11
    That should work actually but I was referring to this one. Sorry, I started talking on the end of it.

    #Redirect an entire site to a sub folder
    Redirect 301 / http://www.domain.com/subfolder/

    That may have gotten lost in translation. I started thinking about my job in college at the Old Thyme Grocery. Is that place still there? 11:50am daily the gates of hell open if you have to work there lol..

    Nigel
     
    Nigel Lew, Jan 16, 2014 IP
  12. airattack111

    airattack111 Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #12
    With the basic 301 redirect, it works, but say you go to bluemoonpresents.com/web first, it redirects to /web/web/web/web/web/web..etc. I'm also unsure about the .htaccess redirects placed in the wordpress folder, I kind of just left it alone. Whenever I make sites (didn't make this one) I always make sure it's in the root folder for convenience.

    Yes old Thyme Grocery is still here, good food, although I haven't been in a while. I actually live about a quarter mile away from it. I'm sure it gets crazy at lunch time, haha.
     
    airattack111, Jan 16, 2014 IP
  13. airattack111

    airattack111 Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #13
    The site was handed to me by my older cousin for event updates, It's recently been switched to wordpress and I've been troubleshooting the problems for about a month now, most of them are figured out by now. But for what they are compensating I'm not complaining...

    He texted me and said it works perfectly for him (thanks to you), I guess that's good enough, I am worried about the SEO but this site is pretty high up there I'm sure the search engines will figure it out. Another reason I like to keep my primary websites in the root folder.
     
    airattack111, Jan 16, 2014 IP
  14. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #14
    Hmm that I would have to look at for a sec but the same basic thing is here.

    http://www.site5.com/blog/apache/htaccess/redirect-to-blog/20090427/

    you would be web in this case of course.

    And, at a glance its working like a champ here. You are likely experiencing a wp super cache issue since you are logged in over there. Clearing it usually solves that sorta thing but I went directly to /web and various pages. Looks ok here.

    Nigel
     
    Nigel Lew, Jan 16, 2014 IP
  15. airattack111

    airattack111 Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #15
    The rewrite in that link was what was originally in place, but it did have an extra 2 lines of code, probably screwing something up. I'll go ahead and clear the wp super cache, there's a plugin for that lol.

    Thanks again for the help!
     
    airattack111, Jan 16, 2014 IP
  16. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #16
    No sweat glad I could help.
    Nigel
     
    Nigel Lew, Jan 16, 2014 IP