1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 www re direct

Discussion in 'XenForo Questions and Support' started by BoxmanCaleb, Jul 17, 2014.

  1. BoxmanCaleb

    BoxmanCaleb Member

    Hello I'm trying to make my website redirect domain.net traffic to www.domain.net I'm running my xenforo root at /var/www/html/
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Check the FAQ in my signature.
     
  3. BoxmanCaleb

    BoxmanCaleb Member

    I already did. That .htaccess didn't work. :/
     
  4. nodle

    nodle Well-Known Member

    Normally it's:

    Code:
    RewriteCond %{HTTP_HOST} ^yoursite\.com [NC]
    RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
    You need to add that to your .htaccess file
     
  5. BoxmanCaleb

    BoxmanCaleb Member

    Code:
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mineslam.net[nc]
    RewriteRule ^(.*)$ http://www.mineslam.net/$1 [r=301,nc]
        #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        RewriteBase /
        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
    That's what I have right now. Still does not work.
     
  6. nodle

    nodle Well-Known Member

    Are you using friendly urls? It looks like you still have index.php? I don't know if this is related or not.
     
  7. BoxmanCaleb

    BoxmanCaleb Member

    I still have index.php
     
  8. nodle

    nodle Well-Known Member

    I am wondering if you need friendly urls enabled before using the .htaccess file. I just don't know for sure since I normally enable friendly urls out of the box. Have you tried to enable friendly urls with the .htaccess file yet?
     
  9. BoxmanCaleb

    BoxmanCaleb Member

    Do you have a Skype we could talk more on at? I have issues with Friendly URL's as well though.
     
  10. nodle

    nodle Well-Known Member

    Sorry I was just trying to help you out through here. Unless someone else chimes in you may have to open a ticket if they support redirects.

    http://xenforo.com/help/friendly-urls/
     
  11. BoxmanCaleb

    BoxmanCaleb Member

    OKay no worries. So do I need it enabled?
     
  12. nodle

    nodle Well-Known Member

    I would. It's way better for SEO and gives you cleaner links.
     

Share This Page