I’m quite new to Yii and Yii2, so this may be super-simple and I’m just missing it, but I can’t seem to get pretty URLs enabled properly. I am able to load the home page of the site, but then all other URLs are returning an Internal Server Error. I’m working with the Advanced Template and have not made hardly any customizations.
I’m trying to work it out based on the info on the URL.md page.
Here’s what I placed in my .htaccess file:
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php
And here is what I placed in the common/config/main.php file:
...
'components' => [
'urlManager' => [
'class' => 'yii\web\UrlManager',
// Disable index.php
'showScriptName' => false,
// Disable r= routes
'enablePrettyUrl' => true
],
...
],
...
Do I also need to set rules? I understood it as only needing rules for custom URLs, but so far the standard yii2 page URLs are returning Internal Server Errors.
Can anyone please help me understand what I am missing?
This is my first post, so it seems I am not allowed to share my test site URLs with you. If you need them, perhaps I can email them to you? Or maybe this will work …
develop.essenceguide[dot]com - works fine
develop.essenceguide[dot]com/site/signup - Internal Server Error
Thanks so much for any insight you can offer!