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

/index.php

Discussion in 'Server Configuration and Hosting' started by newyorksportstown, Jul 19, 2013.

  1. Just launched New York Sports Town yesterday. Uploaded the files into the public_html folder on my server.

    Currently, the link that works is:

    www.newyorksportstown.com/index.php

    www.newyorksportstown.com gives me a blank page.

    Currently it is just the forum, but in the future I suspect there will be more content on the "main" page and the forum will reside under /forum or something similar.

    How do I maintain simply www.newyorksportstown.com to direct to the forum for now without using index.php?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Your forum is currently installed in the root so should automatically work.

    Do you have any index files in the root in addition to the XenForo files?
     
  3. Index files? Don't think so - I only uploaded the contents of the "upload" folder I got from xenforo.
     
  4. I saw the option to "Use Full Friendly URLs" but when I click that, the www.newyorksportstown.com/index.php doesn't work at all either, it just redirects to the root...which also doesn't work.
     
  5. Brandon Sheley

    Brandon Sheley Well-Known Member

    what does your .htaccess file look like
    what kind of server are you on?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    It sounds like your server isn't configured for or doesn't support FURLs, but the blank page from the root URL indicates another configuration issue.
     
  7. I will check the details when I get home - I have it hosted using hostgator if that helps.
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    Make sure you haven't modified your htaccess. By default, HostGator has enabled
    Code:
    DirectoryIndex index.html index.shtml index.php default.html home.html
    in the .htaccess.
    If you deleted .htaccess, then it reappears as an empty file. This info was obtained from http://support.hostgator.com/articles/specialized-help/technical/apache-htaccess/-htaccess-guidance.
    Easiest thing to do (and to enable friendly URL's) is to use the example one provided with xenForo. Just rename it .htaccess.
     
  9. # 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 /xenforo

    # 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>
     
  10. Copy/ pasted everything in htaccess.txt
     
  11. Tracy Perry

    Tracy Perry Well-Known Member

    Modify the RewriteBase to the above in my quoted text.
     
  12. Tried it, still no dice...
     
  13. # 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>
     
  14. New code pasted above...
     
  15. Brogan

    Brogan XenForo Moderator Staff Member

    Is that the .htaccess file or the htaccess.txt file?
     
  16. htaccess.txt, I don't see another htaccess file.
     
  17. Brogan

    Brogan XenForo Moderator Staff Member

    Make sure your ftp client is showing hidden files.

    There should be an .htaccess file in the root with that content.

    If there isn't, create it.
     
  18. Screen shot of my ftp client if that helps - whats strange is now see a "www" folder that appears to be the same content as my public.html folder?
     
  19. Brogan

    Brogan XenForo Moderator Staff Member

    Just create the .htaccess file using the contents of htaccess.txt and upload it to your root.
     
    Last edited: Jul 21, 2013
    Tracy Perry likes this.

Share This Page