Reputation: 421
Used Cakephp 3 routing to set up routes as below
$routes->post(
'/auth/login/*',
['controller' => 'WvUser', 'action' => 'login']
);
$routes->post(
'/auth/signup/*',
['controller' => 'WvUser', 'action' => 'signup']
);
This was working pretty great in Local Server and now I'm receiving 404 error on web page.
This is a fresh installation of apache with minor changes in /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Tried creating a temporary new Cakephp Project which also faced similar issue my project and new temporary cake skeleton both have similar .htaccess files
inside /var/www/project
# Uncomment the following to prevent the httpoxy vulnerability
# See: https://httpoxy.org/
#<IfModule mod_headers.c>
# RequestHeader unset Proxy
#</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(\.well-known/.*)$ $1 [L]
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
inside /var/www/project/webroot
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
There are no errors in /var/www/apache2/error.log
.
Upvotes: 0
Views: 874
Reputation: 66
Sounds like you haven't enabled mod-rewrite in apache.
For Ubuntu:
sudo a2enmod rewrite
sudo systemctl restart apache2
Since its optional (IfModule) apache won't generate an error.
While your at it, also check if mb_string, intl and simplexml are installed
Upvotes: 2