My site worked properly on localhost but on upload to the remote server, only the index.php page is working. The other urls such as login (see below) are not working and return a 404 Not Found error.
The Model-View-Controller design pattern has been implemented so that all pages on the site render through index.php using the appropriate view file.
Simply, the site is designed to work as follows:
index.php page is stored in: www.subdom.mysite.com/public
login to the site is via the link www.subdom.mysite.com/public/user/login where 'user' is a controller PHP class file and 'login' is a method of that class. 'user' and 'login' are used to rewrite the url. The 'login' method prepares the html required for the user login form and passes it to the 'index' view for rendering in the browser.
Additional site functionality works on the same principle as above e.g., making a bank payment via www.subdom.mysite.com/public/bank/payment
Below is my .htaccess file - also stored in the /public folder above. The only change I made to this file after upload to the remote server is on the RewriteBase line.
Options -MultiViews
RewriteEngine On
######################
# Localhost version of the RewriteBase statement:
# RewriteBase /subdom/public
######################
# Remote server version of the RewriteBase statement (as displayed in host's cPanel):
RewriteBase /home2/user/subdom.mysite.com/public
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?atid=$1 [QSA,L]
I've been pulling my hair out for the last few days over this issue. I don't know what I'm missing or what amendments I need to make and so would really appreciate your help to get this working.