I’m now having error PHPMaker 2021.0.14I can log in, and then “The requested URL was not found on this server.”, and yes when removing index from the URL, everything works fine (until you log out and log in again).
The RewriteBase should match the path your site. For example, if your site is at http://mycompany.com/mypath/, then the RewriteBase should be /mypath/. See URL Rewrite for details.
Thank you, however if I do that (and I did read the link you provided) i.e.: RewriteBase /mysite/ and I run the site http://mysite.mycompany.com/ (NOTE I’m running it as a subdomain, not a path). I now get the following error (I don’t even get to a login screen):
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.If I do RewriteBase / and I run the site http://mysite.mycompany.com/, I can log in to my site, but the it gives me the following error:
Not Found
The requested URL was not found on this server.If I now remove index from the URL. everything works normal again (until I log out and log back in, same thing happens). have followed the "upgrade " advice once again to double check myself, and I have read the Rewrite documentation and followed the advice, and I have tried various things with it.I’m running Apache 2.4 on Windows 10, and it works fine on my dev machine, however the moment I move this to my Ubuntu Linux machine, that is where I have the issue (i.e. the “prod machine”).
As the name suggests, the RewriteBase really means the “base” of the path of your site, so if your site use subdomain, there is no base path, the RewriteBase is not “/mysite/”, it should be either one of the follows (depending on your server):
Ok I have solved the issue. In my “production” server, I opened the /etc/apache2/sites-available folder, and I made a change to the mysite.mydomain.com.conf file.
I added in the line in bold text below, i.e. the: Redirect “/index” “/” line. All is good and working fine now.<VirutalHost *:80>
ServerAdmin blah_blah_blah
ServerName mysite.mydomain.com
ServerAlias www.mysite.mydomain.com
DocumentRoot /var/www/mydomain.com/mysite
Redirect “/index” “/”<Directory /var/www/mydomain.com/mysite/>
DirectoryIndex index.php
Options blah_blah_…
AllowOverride All
Order allow,deny
Allow from all
Require all granted
Then did the normal enable of site… and restart Apache!