By raffanello
Hi,
I seem to be having some trouble with Apache Rewrite Directives.
I put the following directives inside of my /etc/apache2/sites-available/default file:
RewriteEngine on RewriteCond %{request_filename} -f RewriteRule ^(.) $1 [L] RewriteRule ^(([^/])+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L]
When I did that they worked just the way I intended. Except that everytime I navigated to the phpmyadmin url I’d get a 500 error.
So to solve this I added RewriteRule ^(phpmyadmin)($|/) - [L]
However when I did that it seemed to have the effect of completely turning the rewrite engine off.
This is the complete config for the directory
"<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all RewriteEngine on RewriteCond %{request_filename} -f RewriteRule ^(?:phpmyadmin)($|/) - [L] RewriteRule ^(.) $1 [L] RewriteRule ^(([^/])+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L]
</Directory>"
Any help would be appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Ok I figured it out.
<br>
<br>Simply putting the
<br>"RewriteRule ^(?:phpmyadmin)($|/) - [L] "
<br>last seemed to do the trick.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.