1

I'm moving an existing site to the new server and spent a couple of days trying to make this work.

Home page of the site loads just fine. Other pages load too if I add /index.php/ to the url. Otherwise I get 'Not Found' error.

Have gone through all the suggestions here: https://craftcms.com/support/remove-index.php, here: https://craftcms.com/support/why-index.php, and here: https://craftcms.com/support/enable-path-info. Everything checks out.

My .htaccess in /public_html:

<IfModule mod_rewrite.c>
   RewriteEngine On

   # Send would-be 404 requests to Craft
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
   RewriteRule (.+) index.php?p=$1 [QSA,L]

</IfModule>

I'm on a clean install of Apache server. Made sure I have all the required extensions and config matches suggestions on the Craft site.

1

Thanks to @brad-bell - his comment on another post pointed me in the right direction. I thought that I already checked on mode_rewrite but I didn't.

The Apache mod_rewrite module wasn't installed, so the block of Craft's default .htaccess file was being skipped not allowing index.php to be rewritten in the URL.

Enabling mod_rewrite solved the issue.

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.