My current site is with Wordpress in the folder /blog. My new Craft install is in a sibling folder /craft. When i try to load brianfeeney.us/craft/admin, i get the wordpress 404. Must be an .htaccess issue, right? Can't figure out or find the solution anywhere.

  • You would typically access the craft admin control panel using brianfeeney.us/admin. Have you configured your index.php with the proper craft path? $craftPath = '../craft';? Might want to reread installation docs. And yes, could also be an htaccess issue. Sep 27 '14 at 16:39
  • Do you really mean a sibling folder? From the URL you're trying to load it looks like a sub-folder.
    – Brad Bell
    Sep 27 '14 at 18:29
  • the folders are within the same root folder, so I think you'd call them siblings. (?) They aren't nested.
    – brian
    Sep 29 '14 at 12:56
  • The craft install will eventually replace my current site (WP), but for now, I'm just trying to get it up and running before I do the redirect. The paths are correct (except I'm also getting the /index.php/ problem that this ('omitScriptNameInUrls' => true) is supposed to solve, but isn't.
    – brian
    Sep 29 '14 at 12:59

Wordpress’ .htaccess file and Craft’s .htaccess file both use the same strategy: If the request is not pointing to a valid file or folder, rather than have Apache respond with a 404, re-route the request to index.php.

It sounds to me like you’ve got a .htaccess fie at your web root which is handling Wordpress’ index.php redirect, and that is taking precedence over Craft’s for whatever reason.

Since your Wordpress install lives within /blog/, you should move that Wordpress .htaccess file to /blog/.htaccess, so it’s only affecting blog/* requests. (You’ll also need to tweak it a bit; post the file’s contents if you need help with that.) Or another option is you could add this condition it, before the RewriteRule line:

RewriteCond %{REQUEST_URI} ^/blog [NC]

Likewise, Craft’s .htaccess file should live at /craft/.htaccess (no modification will be necessary as the one Craft ships with already accounts for the possibility that it’s within a subfolder), or a similar RewriteCond line could be added to it if you really want to keep all your redirects in one place at /.htaccess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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