Edgar Ehritt: Apache .htaccess - Verwendung so korrekt?

Beitrag lesen

Hallo Peter,

----------------------------------------------------------------

Redirect automatically to the en-subdomain

----------------------------------------------------------------

RewriteCond %{HTTP_HOST} www.example.dev$ [NC]

Bedenke auch Aufrufe ohne der Psyeudosubdomain "www."
RewriteCond %{HTTP_HOST} (www\.)?example\.dev$

RewriteRule ^(.*)$ http://en.example.dev/$1 [R=301,L]

Hier würde ich anders vorgehen. Es handelt sich um eine Sprachweiche, was sich auf HTTP-Ebene besser als "Gefunden" denn "Verschoben" repräsentieren lässt:
RewriteRule ^(.*)$ http://en.example.dev/$1 [R=302,L]

----------------------------------------------------------------

Redirect every AJAX-Request to the Ajax-Folder

----------------------------------------------------------------

RewriteRule ([^/]+.ajax) sources/ajax/$1 [L]

Vermutlich hast Du es gemacht, aber in den geposteten Ausschnitt der Konfiguration nicht eingefügt, ansonsten für unbekannte Dateitypen ("ajax" ist nicht in der mime.types nicht eingetragen) immer mit AddType den Mediatypen setzen.

----------------------------------------------------------------

Parse *.html-Files as PHP

Parse *.ajax-Files as PHP

Parse *.tpl-Files as PHP

Parse the main CSS-File as PHP

Parse the Google-Maps JavaScript-File as PHP

----------------------------------------------------------------

<FilesMatch "(^maps\.(js|css)|.*\.(html|ajax|tpl))$">  
     ForceType application/x-httpd-php  
</FilesMatch>

----------------------------------------------------------------

Increase PHP's Memory Limit

----------------------------------------------------------------

php_value memory_limit 128M

Viel zu hoch.

Gruß aus Berlin!
eddi