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

XF 1.4 .htaccess file deleted

LogOn

Active member
#1
Hi guys,

By mistake, i've deleted my .htaccess file, and after searching the forum for the same issue's, now i have the .htaccess content bellow:

# 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>
My admin pannel work's just fine, but my forum does't work at all.

My forum is: http://recomandare.net/

Thank you!
 

AndyB

Well-known member
#2
Try commenting out the #RewriteBase /xenforo

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 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 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>
 

LogOn

Active member
#3
Thank you AndyB! Do i have to change something to this code?

I tried a forum upgrade, but it doesn't work
 
Last edited:

AndyB

Well-known member
#4
Thank you AndyB! Do i have to change something to this code?
Should need to, it's what comes with XenForo as default.

I tried a forum upgrade, but it doesn't work
Did you upload a newer version of XenForo in an attempt to upgrade? If so try downloading the version which was there before and uploading those files. Hopefully your forum will once again work.
 

LogOn

Active member
#5
Did you upload a newer version of XenForo in an attempt to upgrade? If so try downloading the version which was there before and uploading those files. Hopefully your forum will once again work.
I'v upgraded to 1.4.6 2 months ago or so and worked just fine... Do you still think i nedd to try a diferent version?