• 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

iTuN3r

Well-known member
#1
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 .

# 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>
 

Jake Bunce

XenForo moderator
Staff member
#4
Fixed. Your .htaccess file was in the web root while your forum was in /forum. It needed to be in the /forum directory.
 
#7
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 -_-
 

Jake Bunce

XenForo moderator
Staff member
#8
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 -_-
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.
 
#9
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.
I have two .htacces one with .txt and one with .htaccs
and nothing else on it what should i do then?
 

Brogan

XenForo moderator
Staff member
#10
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
Th
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>
Thank you it works now :)