| | | | |
| |||||||
| Server, Hosting und Workstations Server-Konfigurationsdateien (.htaccess/httpd.conf) und Arbeiten auf Serverebene |
|
| | LinkBack | Themen-Optionen | Thema bewerten |
| | |
| Erfahrener Benutzer Registriert seit: 28.09.2008
Beiträge: 1.168
PHP-Kenntnisse: Fortgeschritten ![]() | Wenn ich im Browser http://www.domain.de/test/images/wor...1/thumbs/1.jpg eingeb, dann erscheint das selbe Bild wie wenn ich http://www.domain.de/test/images/wor.../thumbs/15.jpg Obwohl es nur 1.jpg gibt. Liegt das an der htaccess?: Code: # you probably want www.example.com to forward to example.com -- shorter URLs are sexier.
# no-www.org/faq.php?q=class_b
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /test/
RewriteRule ^contact.html contact.php [L]
RewriteRule ^work.html work.php [L]
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/test/$1 [L]
</IfModule>
# allow access from all domains for webfonts
# alternatively you could only whitelist
# your subdomains like "sub.domain.com"
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
# video
AddType video/ogg ogg ogv
AddType video/mp4 mp4
AddType video/webm webm
# Proper svg serving. Required for svg webfonts on iPad
# twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# webfonts
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType font/woff woff
# assorted types
AddType image/vnd.microsoft.icon ico
AddType image/webp webp
AddType text/cache-manifest manifest
AddType text/x-component htc
AddType application/x-chrome-extension crx
# gzip compression.
<IfModule mod_deflate.c>
# html, txt, css, js, json, xml, htc:
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
# webfonts and svg:
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
# custom 404 page
ErrorDocument 404 /404.html
# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist
# e.g. /blog/hello : webmasterworld.com/apache/3808792.htm
# Options -MultiViews
# -Indexes will have Apache block users from browsing folders without a default document
# Options -Indexes
# use utf-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8
# force utf-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss
__________________ Eine if-else-Abfrage nimmt, ordentlich geschrieben eine Menge Platz weg. Platzsparend geht es mit einem ternären Operator. Geändert von Koala (01.02.2011 um 05:31 Uhr). |
| | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Erfahrener Benutzer | Da gibs auch nur 1 jpg, jede anfrage leitet auf /1.jpg um
__________________ |
| | |
| | |
| Erfahrener Benutzer | Code: CheckSpelling Off
__________________ |
| | |
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [Erledigt] Geänderte Bilder neu resizen | smilla | PHP Tipps 2010 | 3 | 06.03.2010 19:13 |
| [Erledigt] Wie kann man Bilder sinnvoll verkleinern? | Squall | PHP Tipps 2009 | 7 | 17.06.2009 15:55 |
| [Erledigt] Bilder werden nur binär codiert angezeigt... | herrQless | PHP Tipps 2009 | 11 | 10.06.2009 17:48 |
| Bilder in Dropdown werden nicht angezeigt? | SimStar001 | HTML, Usability und Barrierefreiheit | 3 | 06.05.2009 09:43 |
| Bilder ohne DB sicher speichern | Diet | PHP Tipps 2005 | 6 | 25.03.2009 00:07 |
| bilder werden zufällig (?) angezeigt oder nicht angezeigt (nur firefox) | elmuerte | PHP Tipps 2009 | 3 | 19.03.2009 11:45 |
| Bilder werden nicht angezeigt | sawi | PHP Tipps 2006 | 6 | 05.04.2006 13:53 |
| Bilder werden nicht angezeigt | PHP Tipps 2006 | 10 | 29.01.2006 15:03 | |
| Bilder werden nicht angezeigt? | seejay | PHP Tipps 2007 | 3 | 20.12.2005 09:33 |
| Bilder löschen | PHP Tipps 2005-2 | 4 | 24.10.2005 11:37 | |
| Bilder aus einem unterverzeichis anzeigen.Hilfe | PHP Tipps 2005-2 | 3 | 12.09.2005 15:36 | |
| Mehrere Bilder Hochladen und bearbeiten | PHP Tipps 2005-2 | 7 | 23.07.2005 13:48 | |
| Bilder in Tabellen | nixdorf | HTML, Usability und Barrierefreiheit | 36 | 09.05.2005 21:15 |
| Bilder können nicht angezeigt werden??? | Server, Hosting und Workstations | 2 | 17.06.2004 14:57 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| addtype text/x-component .htc, htaccess addtype json, htaccess addtype video, addtype mp4, htacces font woff, addtype webm, addtype apache fonts .htaccess ttf, htaccess \application/javascript\ addtype, apache2 ogv addtype, deflate bilder, apache2 addtype webm, woff htaccess, apache image multiviews svg png, addtype filematch mp4, bilder 404 htaccess, bilder nicht angezeigt error 404 htaccess, if else abfrage htaccess, mp4 thumb php css, mod_speling htaccess ausschalten, addtype video/webm .webm .htaccess |