Correct Apache AddType directives for font MIME types

I realize that this question is old, but for anyone looking for a quick copy/paste for adding font MIME types to their .htaccess: <IfModule mod_mime.c> AddType application/vnd.ms-fontobject .eot AddType application/x-font-opentype .otf AddType image/svg+xml .svg AddType application/x-font-ttf .ttf AddType application/font-woff .woff AddType application/font-woff2 .woff2 </IfModule>

Set RewriteBase to the current folder path dynamically

Here is one way one can grab the RewriteBase in an environment variable which you can then use in your other rewrite rules: RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$ RewriteRule ^(.*)$ – [E=BASE:%1] Then you can use %{ENV:BASE} in your rules to denote RewriteBase, i.e.: #redirect in-existent files/calls to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . %{ENV:BASE}/index.php [L] Explanation: … Read more

The Redirection of Multiple Parked Domains doesn’t Work with Filename [closed]

If the questioner starts rewrite ruling with [R=301] 301 redirect, a.k.a. “Permanently Redirect”, and then he try to view his URL www.parkeddomain1.com/subfolder/ but the result of the rule wasn’t what he want, then even he try to change the redirecting rule, his web browser will always redirect that URL into the first URL where it … Read more

using mod_rewrite with XAMPP and windows 7 – 64 bit?

Below are the instructions on how to enable .htaccess mod_rewrite in xampp. Open and edit C:\xampp\apache\conf\httpd.conf in a text editor Find the line which contains #LoadModule rewrite_module modules/mod_rewrite.so and (uncomment) change to LoadModule rewrite_module modules/mod_rewrite.so Find all occurrences of AllowOverride None and change to AllowOverride All Restart xampp That’s it you should be good to … Read more

Apache rewrite rules not being applied for angularjs

This is now much easier in Apache 2.2.16+ using the FallbackResource directive. FallbackResource /app/index.html http://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource Depending on how you’re forwarding access to your API you may need to also leverage the enclosure to disable the fallback resource on specifically on API requests (2.2.24+). <Directory /api> FallbackResource disabled </Directory>

500 Internal Server Error?

With the info you provided it’s difficult to say. Error 500 happens because you did some error in the code that is supposed to produce the page, or the code generates some unhandled exception. My suggestion is to visit the page that gives you the 500 error, and then try to comment out all your … Read more