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

phpBB -> xF .htaccess

Discussion in 'XenForo Questions and Support' started by xenTheory, Apr 20, 2013.

  1. xenTheory

    xenTheory Active Member

    So my forum has been using xF now for quite some time and I see no need to continue to have a complicated htaccess file (which affects PR) as there were only around 1000 posts on phpBB and it was months and months ago.

    So, here is my current htacesss:

    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^www\.([^.]+)\.([^.]+)$
        RewriteRule ^(.*)$ http://%1.%2/$1 [R=301,L]
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
        RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
        RewriteRule ^viewtopic\.php$ /threads/%2? [L,R=301,NC]
        RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
        RewriteRule ^viewtopic\.php$ /posts/%2? [L,R=301,NC]
        RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
        RewriteRule ^viewforum\.php$ /forums/%1 [L,R=301,NC]
        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]
    What should I change it to in order to remove the phpBB redirects, or is it best to just leave it?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It doesn't hurt to leave it.

    Otherwise you can see a default htaccess.txt file in the .zip and remove the additional entries.
  3. xenTheory

    xenTheory Active Member

    Thank you for the reply, I was concerned about page ranking etc and it does seem to produce a lot of errors, however I'm trying to work that out.

Share This Page