XF 1.5 Xenforo - Wordpress installation 404 conflict


Hi, guys

I have problem and I have no idea what is the cause.

So far my wordpress site http//www.letsdance.ro and my xenforo instalation http://www.letsdance.ro/comunitate/ worked perfectly together.

But now I see that I can only see the first page of my xenforo instalation http://www.letsdance.ro/comunitate/

When I try to acces the topics, the media gallery or any other resource of the xenforo instalation, i get a 404 from wordpress...

Do you know why this is happening?


hi, ehd

thank you for the reply.

my .htaccess file in the root of the site looks like this
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

the .htaccess in the xenforo instalation folder looks like this
#    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

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 /comunitate

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /comunitate/threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^(viewforum\.php|viewtopic\.php)$ /comunitate/forums/%1? [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /comunitate/posts/%2? [L,R=301,NC]

    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]


Do you see any issues with it?

I dont know what all those settings mean.

A few days back I've installed the W3 Total Cache plugin for wordpress and I suspect that this is causing the problem...

i have deactivated it now, but the issue still remains.
Last edited:


XenForo developer
Staff member
I would also suggest temporarily removing your WordPress .htaccess to see what happens then. It may shed more light on what's going on.


hi, @Robru

yes. the cache has been cleared.

hi, @Mike

I have removed the wordpress .htaccess and nothing different happened.

The wordpress instalation continued to work normally and the xenforo instalation is still not working.

Also I have noticed that for some reason the links of the threads in xenforo dont have the same format as a week ago.

For example the link of this post http://www.letsdance.ro/comunitate/posts/20216/ would have been http://www.letsdance.ro/comunitate/threads/ce-sa-faci-daca-lipsesti-de-la-dansuri.3965/

And I have another issue, when i try to log in, i get redirected to http://www.letsdance.ro/comunitate/login/login which returns a 404.



i have managed to log it to the admin panel

I see that I have some outdated templates.

could those be the issue?Capture.PNG

also i have many server log errors like this

Unable to Connect to tcp://www.gravatar.com:80. Error #110: Connection timed out23 January 2017 - library/Zend/Http/Client/Adapter/Socket.php:235

they stoped on the 23rd of january...

I suspect that that is the day when the structure of the community stoped working.

I have tried to install the upgrade package again, but it says that it is up to date.

I did a rebuild master data and still no succes.

I have compared the curent .htaccess files with the ones of a back-up I did november last year. They are identical.

I have ran out of options.

i dont understand why the first page of my community displays and when I try to click any kind of link on the page, the wordpress instalation kicks in and gives me the 404.
Last edited:


Well-known member
Try a few things first.

Compare the XenForo .htaccess that was working prior to Jan 23 to current. Make a backup of current online. Upload the htaccess included with XenForo zip file you downloaded and test.

Did you use sFTP and was there interruption? Did you re upload files?

Remove W3 Total Cache completely. Don't just deactivate. Remove the caching folders etc. see the developer instructions for complete removal.

As an alternative, WP Fastest cache is free and will do a great job.


hi, @LPH

Thank you for the reply.

I did remove all traces of W3 Total Cache.

I am using Cpanel File manager to upload and yes, I have tried to upload again.

I have tested with all the combinations of .htaccess files possible.

I have even called my hosting company and they said that they can't tell with the redirects dont work and that I should talk to you guys.

There is one thing that bugs me though.

When the first page of the community is displayed, the links that are towards threads are different from the ones that should be generated (they are not Full Friendly Urls), so the board is generating some bad links.

I have checked the config and it says that the board should generate this http://www.letsdance.ro/comunitate/threads/ce-sa-faci-daca-lipsesti-de-la-dansuri.3965/ instead of this http://www.letsdance.ro/comunitate/posts/20216/ !

Of course, both of them go to 404.

What do you recommend next?


XenForo developer
Staff member
When the first page of the community is displayed
This won't depend on rewrites, hence why it works.

No, both are valid and both are generated in different scenarios. There's no evidence of problems here.

The fact that you still get a WordPress 404 when there's no WordPress .htaccess is concerning. Without that, nothing should be redirecting into WP. This makes me wonder if there is some configuration that was changed within your actual VHost configuration, including disabling .htaccess ("AllowOverride None" set).

You could test this by putting the following in the XF directory .htaccess:
Order deny,allow
Deny from all
If you can still access XF, then it doesn't look like the .htaccess is being processed. You could repeat the process with WordPress.