Old Virtual Host Configuration Access Forbidden Error 403 (XAMPP)

This was frustrating until I realized some of the configuration options I have been using for so long when configuring a virtual host in my local machine have been deprecated. Adding one line of code did the trick – Require all granted This is what I used to use:
<Directory "/websites/httpdocs/dummmy-website">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
And this is what I’m using now.
<Directory "/websites/httpdocs/eOpiates/website-dynamic/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>

Apache Module mod_rewrite

Some things to remember when working with Apache module mod_rewrite and dynamic websites: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
  • <CondPattern‘ (lexicographically precedes) Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically precedes CondPattern.
  • >CondPattern‘ (lexicographically follows) Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically follows CondPattern.
  • =CondPattern‘ (lexicographically equal) Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString is lexicographically equal to CondPattern (the two strings are exactly equal, character for character). If CondPattern is "" (two quotation marks) this compares TestString to the empty string.
  • -d‘ (is directory) Treats the TestString as a pathname and tests whether or not it exists, and is a directory.
  • -f‘ (is regular file) Treats the TestString as a pathname and tests whether or not it exists, and is a regular file.
  • -s‘ (is regular file, with size) Treats the TestString as a pathname and tests whether or not it exists, and is a regular file with size greater than zero.
  • -l‘ (is symbolic link) Treats the TestString as a pathname and tests whether or not it exists, and is a symbolic link.
  • -F‘ (is existing file, via subrequest) Checks whether or not TestString is a valid file, accessible via all the server’s currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care – it can impact your server’s performance!
  • -U‘ (is existing URL, via subrequest) Checks whether or not TestString is a valid URL, accessible via all the server’s currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care – it can impact your server’s performance!