I have WordPress in a test folder inside the root directory where I Joomla! 3.x site is running. Somehow the Joomla! rewrite rules are interfering with the WordPress permalinks rules. I keep on getting Joomla! 404 messages and some odd:

file_get_contents(url) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /path/to/file.php on line 16

errors. I try to resolve these specific errors here on StackOverflow.

Is there a way I can make Joomla! only worry about Joomla! pages and make WordPress have its permalinks work again? I have not been able to come up with a rewrite rule or condition that works thus far. I tried the one mentioned here as well. I used

RewriteCond %{REQUEST_URI} !^foldername

which I added to the Joomla! .htaccess file just below the line where it says RewriteEngine On

No luck so far..


See answer below. It was a faulty WP .htacces after all. Once it was correct is started working and ignoring the Joomla! .htaccess.

  • This would probably be a question for a joomla! answers site, as you are looking to change the filters and code of the way joomla! functions, and not wordpress.
    – Vigs
    Commented Jul 20, 2013 at 3:10
  • Yeah, this question could have been asked at the Joomla! forum as well, but as the Joomla! site was doing OK and the WordPress site had issues I decided to ask here. Anyways, as shown in my answer I figured it out more or less by now. And it seems that the correct WP .htaccess was just as important.
    – rhand
    Commented Jul 20, 2013 at 3:14
  • 1
    Fair enough. I will remove my downvote when possible seeing as wordpress was the cuplrit.
    – Vigs
    Commented Jul 20, 2013 at 3:23
  • Thanks, I think you can just upvote it to even things out.
    – rhand
    Commented Jul 20, 2013 at 3:28
  • It wanted me to wait 12 minutes to change the vote xD lol
    – Vigs
    Commented Jul 20, 2013 at 3:29

1 Answer 1


I found out that with the extra rewrite rule added to the Joomla! .htaccess file and with the corrected WordPress .htaccess file - wrong paths - the site started working again. I removed the Joomla! rewrite rule to ignore the WP folder and WP seems to be able to stand on its own now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.