XF 2.2 Error 404 when "Use Full Friendly URLs" enabled (XF in subdirectory of Wordpress)

webmasterxl

Member
Hi,

I have installed my Xenforo forum in a sub-directory of a Wordpress installation. I don't know if it has something to do with the following problem: After enabling "Use Full Friendly URLs" in Basic Options of the Xenforo forum, a 404 error is produced whenever I click an a Thread/Post/Category a.s.o. within the Xenforo forum. When doing so, the standard 404 page of my Wordpress site is shown.

Any idea how to solve this, such that I am able to use friendly URLs for my Xenforo forum?

Thanks in advance

webmasterxl
 
I already have the .htaccess file in my XF subdirectory. This is what it reads:

# 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 workaround HTTP Basic auth issues when using 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>

Do you think that it might help the remove the # in "#RewriteBase /xenforo" and insert my subdirectory instead of "xenforo" ?
 
Ok, this worked:

1. Deleted "#" from "#RewriteBase /xenforo" in the .htaccess of XF in the subdirectory such that it reads "RewriteBase /xenforo"
2. Inserted the name of my subdirectory (here: community) in "RewriteBase /xenforo" such that it reads: "RewriteBase /community"

That's it.

Special thanks to Mr Lucky !!
 
Yes, sorry I had forgotten there is that message about uncommenting (removing #) the lines as specified. In my case it worked without uncommenting.

So a bit of trial and error but good that it's all working now.
 
Back
Top Bottom