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

XF 1.4 IE10 redirects to /forum

Discussion in 'Troubleshooting and Problems' started by Chad, Jan 5, 2015.

  1. Chad

    Chad Active Member

    Hey all,

    I have this odd issue where with IE (doesn't seem to happen with Firefox), directs my talkjesus.com (and www.talkjesus.com) domain initially to talkjesus.com/forum and error 'requested page not found'.

    I have this enabled in admin: create pages for categories and friendly URLs enabled.

    What could cause this?

    My htaccess:

    Code:
    RewriteEngine On
    RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /index.php?threads/$1/ [R=301,L]
    RewriteCond %{HTTP_HOST} !^www\.talkjesus\.com$
    RewriteRule ^(.*)$ http://www.talkjesus.com/forum/$1 [R=301,L]
       
    #    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
    #</IfModule>
    
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        #    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|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
     
  2. Mike

    Mike XenForo Developer Staff Member

    Well your second RewriteRule specifically redirects talkjesus.com (as in, without the www) to with the www and to the forum directory. www.talkjesus.com works as expected for me in IE.
     
  3. Chad

    Chad Active Member

    Hmmm...I want it always to redirect to www. What should the htaccess look like in this case? I believe what I pasted is what I had with VB4 prior to my migration last week.
     
  4. Mike

    Mike XenForo Developer Staff Member

    Presumably you just want that line to be:
    Code:
    RewriteRule ^(.*)$ http://www.talkjesus.com/$1 [R=301,L]
     
  5. Chad

    Chad Active Member

    So this...

    RewriteEngine On
    RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /index.php?threads/$1/ [R=301,L]
    RewriteCond %{HTTP_HOST} !^www\.talkjesus\.com$
    RewriteRule ^(.*)$ http://www.talkjesus.com/forum/$1 [R=301,L]

    Becomes this?

    RewriteEngine On
    RewriteRule ^(.*)$ http://www.talkjesus.com/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} !^www\.talkjesus\.com$

    Please keep in mind that I set redirects from old vb links as well, to avoid losing SEO benefits and avoid broken links.
     
  6. Chad

    Chad Active Member

  7. Mike

    Mike XenForo Developer Staff Member

    No, it should be:
    Code:
    RewriteEngine On
    RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /index.php?threads/$1/ [R=301,L]
    RewriteCond %{HTTP_HOST} !^www\.talkjesus\.com$
    RewriteRule ^(.*)$ http://www.talkjesus.com/$1 [R=301,L]
     
    Chad likes this.
  8. Chad

    Chad Active Member

    Thank you sir!
     

Share This Page