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

XF 1.2 Modified .htaccess, now nothing works.

Discussion in 'Installation, Upgrade, and Import Support' started by MJD, Dec 6, 2013.

  1. MJD

    MJD Member

    I was wondering if any HTACCESS pros out there can help as I'm about to throw my computer out the 2nd story window...

    So I modified the HTACCESS file and now none of my redirects are working. Every page in Google is coming up 404.

    So, I put it back the way it was, before I modified it. (It was working fine before the modification - Google SERPS were indeed redirecting properly)

    I waited 5 seconds, and re-uploaded the old version. (The one that worked.)

    Even after restoring the file, it still doesn't work. By works, I mean all the redirects fail to work anymore, when they worked before. If I Google my site, all links in the search enging get 404'd to my old forum's page.

    As far as I know, I did everything correctly when I did the VB import, including the 301config.php file, archived import, etc. My old forum was in the root, while the new forum is in community. Heck, I figured it worked because redirects occurred for 3 days.

    My Old forum: www.website.com
    New forum www.website.com/community

    My old VB install was using Advanced Links. So

    should be going to Xenforo Friendly Urls

    Here is what's in the HTACCESS file (The OLD forum ROOT)
    RewriteEngine On
    #RewriteBase /community/
    RewriteRule ^forum\.php$ /community/index\.php [R=301,L]
    RewriteRule ^(threads|forums|members)/(.*)$ /community/$1/$2 [R=301,L]
    RewriteRule ^$ /community/ [R=301,L]
    RewriteRule ^/showthread.php /community/showthread.php
    RewriteRule ^/forumdisplay.php /community/forumdisplay.php
    Here is what's in the HTACCESS file (The NEW forum root @ Community)
    #   Mod_security can interfere with uploading of content such as attachments. If you
    #   cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #   SecFilterEngine Off
    #   SecFilterScanPOST Off
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    DirectoryIndex index.php
    <IfModule mod_rewrite.c>
       RewriteEngine On
      RewriteCond %{HTTP_HOST} ^mywebsite.com/community$ [NC]
      RewriteRule ^(.*)$ http://www.mywebsite.com/community/$1 [R=301,L]
       #   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 /community
       #   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|crossdomain\.xml|robots\.txt) - [NC,L]
       RewriteRule ^.*$ index.php [NC,L]
    Can anyone proficient in the world of HTACCESS see what is going on?
    Last edited: Dec 6, 2013
  2. MJD

    MJD Member

    Odd... so I did a Google search on my website and it turns out all PAGE 1 redirects fail -- I get 404'd. PAGE 2 on Google for the same search, the redirects actually work. Also, despite the directive to redirect non www versions to www, it refuses to do so.

    I give up.:(
  3. Adam Howard

    Adam Howard Well-Known Member

    Google does not change in real-time. It takes a while (days / weeks) before you will see a difference in Google. So if this is how you're going about it... You're going about it all wrong.

Share This Page