Closed maquibo86 closed 1 year ago
I've solved it with the following code according to the guide "https://www.yiiframework.com/doc/guide/2.0/en/start-installation#configuring-web-servers"
<Directory />
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
RewriteEngine on
# if $showScriptName is false in UrlManager, do not allow accessing URLs with script name
RewriteRule ^index.php/ - [L,R=404]
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
</Directory>
Thank you very much
Hi, I'm having issues if I leave "'enablePrettyUrl' => true," I have to set it to "false" for the application to work. I've enabled mod_rewrite, and I've created an htaccess file inside the public folder with the following code:
I've also tried with the following htaccess and it doesn't work either:
In the Apache virtualhost, I've added the following:
I can't think of any other ideas. Can you help me? Thank you very much. PS: If I set enablePrettyUrl to false, it works fine.