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

XF 1.1 Friendly URL's not working

Discussion in 'Troubleshooting and Problems' started by iTuN3r, Dec 29, 2011.

  1. iTuN3r

    iTuN3r Well-Known Member

    I am trying to fix a board for a buddy . Forum is located at site/forum . I enabled friendly URL's but i keep on getting this error while trying to open a particular forums.

    Not Found

    The requested URL /index.php was not found on this server.

    I am getting same problem while clicking on Usernames , can't get to profile page.

    This is the .htaccess file .

     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    index.php not found. Weird.

    Can you post a URL to the forum?
     
  3. iTuN3r

    iTuN3r Well-Known Member

    PM sent jake !
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Fixed. Your .htaccess file was in the web root while your forum was in /forum. It needed to be in the /forum directory.
     
  5. iTuN3r

    iTuN3r Well-Known Member

    Thanks Jake ! I didn't paid attention there since i am only limited upto forum works.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Pretty much what I said in the PM yesterday afternoon.

     
  7. Jallekobber

    Jallekobber New Member

    I have the same problem. I'm not much of a pro into this software and im making my way around but where do i get that mod_rewrite thing and how do i install it -_-
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The XF zip file has a file called "htaccess.txt". You need to upload that file to your web server and then rename it to ".htaccess". That will enable the rewrite rules and allow you to use friendly URLs.
     
    betnod likes this.
  9. Jallekobber

    Jallekobber New Member

    I have two .htacces one with .txt and one with .htaccs
    and nothing else on it what should i do then?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Copy the contents of htaccess.txt to the .htaccess file.
    The .htaccess file should already be populated though.

    A default .htaccess file in 1.1 looks like this:
    Code:
    #    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) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
     
  11. Jallekobber

    Jallekobber New Member

    Th
    Thank you it works now :)
     
  12. when i did this it says 404 not found
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It appears to be working. I just checked your forum.

    A 404 error when enabling friendly URLs usually means the .htaccess file is not in place. Make sure the ".htaccess" file exists inside of your XF directory.
     
  14. my installation is in the publichtml and the file is there in the root
     
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What page gives the 404 error? Can you post the URL?
     
  16. I just fix it and watching I ll let you know if it happen again
     

Share This Page