# .htaccess und Baidu Spider

**URL:** <https://forum.shopware.com/t/htaccess-und-baidu-spider/20018>\
**Category:** Shopware 3.5\
**Tags:** administration\
**Created:** [30. April 2014 um 17:22 UTC](https://forum.shopware.com/t/htaccess-und-baidu-spider/20018 "2014-04-30T17:22:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VolkerSchroder](https://avatars.discourse-cdn.com/v4/letter/v/4da419/32.png) [@VolkerSchroder](https://forum.shopware.com/u/VolkerSchroder)\
**Post date:** [30. April 2014 um 17:22 UTC](https://forum.shopware.com/t/htaccess-und-baidu-spider/20018/1 "2014-04-30T17:22:28Z")

</div>

Ich hab Probleme mit einem sehr schnell wachsenden http Cache. Wenn ich mir die Dateien ansehe, dann ist jede 3. oder 4. mit “[http://www.baidu.com/](http://www.baidu.com/)” Da wir nicht nach China verkaufen, würde ich daher gerne den Baidu Spider ausschließen… Ich brauche allerdings Hilfe bei der .htaccess ☹ das hier hab ich im Netz gefunden: [quote]RewriteCond %{HTTP\_USER\_AGENT} ^Baiduspider.\* [NC][/quote] Wäre das so korrekt? [quote]  
RewriteEngine on

#RewriteBase /shopware/

RewriteRule shopware.dll shopware.php  
RewriteRule files/documents/.\* engine [NC,L]  
RewriteRule backend/media/(.\*) media/$1 [NC,L]

RewriteCond %{HTTP\_USER\_AGENT} ^Baiduspider.\* [NC]  
RewriteCond %{REQUEST\_URI} !(/(engine|files|templates)/)  
RewriteCond %{REQUEST\_URI} !(/media/(archive|banner|image|music|pdf|unknown|video)/)  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteRule ^(.\*)$ shopware.php [PT,L,QSA]  
# Staging-Rules start #SetEnvIf Host “staging.test.shopware.in” ENV=staging DirectoryIndex index.html DirectoryIndex index.php DirectoryIndex shopware.php # Disables download of configuration  
Deny from all  
# Enable gzip compression #

# AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/json

# 

```
AddOutputFilterByType DEFLATE text/plain text/html text/xml
AddOutputFilterByType DEFLATE text/css text/javascript
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/json

```

ExpiresActive on  
ExpiresDefault “access plus 1 month”  
FileETag None  
  
Header append Cache-Control “public”  
Header unset ETag  
  
  
# Disables auto directory index  
Options -Indexes  
  
Options -MultiViews

# php\_value memory\_limit 128M

# php\_value max\_execution\_time 120

# php\_value upload\_max\_filesize 20M

php\_flag phar.readonly off  
php\_flag magic\_quotes\_gpc off  
php\_flag session.auto\_start off  
php\_flag suhosin.session.cryptua off  
php\_flag zend.ze1\_compatibility\_mode off  
# AddType x-mapp-php5 .php # AddHandler x-mapp-php5 .php [/quote]
