htacess für wordpress

Alles, was den Apache betrifft, kann hier besprochen werden.

htacess für wordpress

Postby cflowa » 27. January 2016 08:20

Hallo Leute,

kann mir jemand helfen eine gute .htacess für Wordpress zu erstellen?
Ich finde dazu zwar viel, aber irgendwie sind die Vorlagen veraltet, erzeugen einen Crash oder es fehlt die Hälfte.

Ich will eig. nur ein Caching und eine Compresson einstellen bzw. erzeugen.
Standardmäßig für Bilder, Text, Videos, Fonts usw.


Ich habe bereits diese hier geschrieben: Bin aber der Meinung , dass irgendwas mit der Datei nicht stimmt. Denn seitdem ich die Datei aufm Server hatte, sind alle mein Links aus Facebook verschwunden und es funktioniert die Linkvorschau nicht mehr.
Weiss jemand was vll. im Code noch fehlt, bzw. was ich entfernen sollte, weil es unnötig ist.
Ich will wie gesagt nur bessere Ladezeiten, zudem mich Googlespeedtest darauf hingewiesen hat.

Code: Select all
# BEGIN WordPress

<IfModule mod_rewrite.c>

   RewriteEngine On
   RewriteBase /
   RewriteRule ^index\.php$ - [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /index.php [L]



 ExpiresActive on
   ExpiresDefault                                      "access plus 1 month"

  # CSS
    ExpiresByType text/css                              "access plus 1 year"

  # Favicon (cannot be renamed!)
    ExpiresByType image/x-icon                          "access plus 1 week"

  # HTML components (HTCs)
    ExpiresByType text/x-component                      "access plus 1 month"

  # JavaScript
    ExpiresByType application/javascript                "access plus 1 year"

  # Media
    ExpiresByType audio/ogg                             "access plus 1 month"
    ExpiresByType image/gif                             "access plus 1 month"
    ExpiresByType image/jpeg                            "access plus 1 month"
    ExpiresByType image/png                             "access plus 1 month"
    ExpiresByType video/mp4                             "access plus 1 month"
    ExpiresByType video/ogg                             "access plus 1 month"
    ExpiresByType video/webm                            "access plus 1 month"

  # Web fonts
    ExpiresByType application/font-woff2                "access plus 1 month"
    ExpiresByType application/font-woff                 "access plus 1 month"
    ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
    ExpiresByType application/x-font-ttf                "access plus 1 month"
    ExpiresByType font/opentype                         "access plus 1 month"
    ExpiresByType image/svg+xml                         "access plus 1 month"



</IfModule>

<IfModule mod_deflate.c>

    <IfModule mod_setenvif.c>
   
        <IfModule mod_headers.c>
            SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
            RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
        </IfModule>
      
    </IfModule>


    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE application/atom+xml \
                                      application/javascript \
                                      application/json \
                                      application/rss+xml \
                                      application/vnd.ms-fontobject \
                                      application/x-font-ttf \
                                      application/x-web-app-manifest+json \
                                      application/xhtml+xml \
                                      application/xml \
                                      font/opentype \
                                      image/svg+xml \
                                      image/x-icon \
                                      text/css \
                                      text/html \
                                      text/plain \
                                      text/x-component \
                                      text/xml
    </IfModule>

</IfModule>

# END WordPress



achja zu meinem System, ich habe einen Webspace mit folgenden Infos:

WordPress: 4.3.2
PHP: 5.3.29
Handler: cgi-fcgi
System: Linux 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC 2014 x86_64
Writable: Yes


Server Type

Apache/2.2.16
cflowa
 
Posts: 1
Joined: 27. January 2016 08:14
Operating System: Linux

Re: htacess für wordpress

Postby Nobbie » 27. January 2016 12:45

Du bist hier im falschen Forum, das Forum beschäftigt sich mit Apache, nicht mit WordPress. WordPress installiert ja selbst eine .htaccess, wenn Du die modifizieren willst, solltest Du in einem WordPress Forum fragen, was Du ändern kannst und darfst. Das kann Dir hier keiner beantworten (ich sowieso nicht, ich habe keine Ahnung von WordPress an sich, ich weiß nur, wie man es installiert).
Nobbie
 
Posts: 13174
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 401 guests