# Shopware4 mod\_rewrite

**URL:** <https://forum.shopware.com/t/shopware4-mod-rewrite/23700>\
**Category:** Shopware 3.5\
**Tags:** installation--gettin\
**Created:** [20. November 2014 um 13:07 UTC](https://forum.shopware.com/t/shopware4-mod-rewrite/23700 "2014-11-20T13:07:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrj4all](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nrj4all](https://forum.shopware.com/u/nrj4all)\
**Post date:** [20. November 2014 um 13:07 UTC](https://forum.shopware.com/t/shopware4-mod-rewrite/23700/1 "2014-11-20T13:07:41Z")

</div>

Hallo 🙂 ich habe mir Shopware in das Root Verzeichnis des Apache gelegt und habe anscheinend ein Problem mit dem Addon mod\_rewrite, denn ich erhalte beim Zugriff auf das Backend die Meldung: [quote]Not Found The requested URL /backend was not found on this server.[/quote] Allerdings ist mod\_rewrite (gem. phpinfo) installiert: [quote]Loaded Modules core mod\_so mod\_watchdog http\_core mod\_log\_config mod\_logio mod\_version mod\_unixd mod\_access\_compat mod\_alias mod\_auth\_basic mod\_authn\_core mod\_authn\_file mod\_authz\_core mod\_authz\_host mod\_authz\_user mod\_autoindex mod\_deflate mod\_dir mod\_env mod\_filter mod\_mime prefork mod\_negotiation mod\_php5 mod\_rewrite mod\_setenvif mod\_status [/quote] Die .htaccess Datei ist vorhanden: [quote]foo@bar:~ ll /var/www/html/ total 32148 drwxr-xr-x 11 foo foo 4096 Nov 20 12:34 ./ drwxr-xr-x 4 foo foo 4096 Nov 20 09:56 ../ -rw-r--r-- 1 foo foo 1508 Sep 24 11:39 autoload.php drwxr-xr-x 2 foo foo 4096 Sep 24 11:39 bin/ drwxr-xr-x 9 foo foo 4096 Sep 24 11:39 cache/ -rwxrwxrwx 1 foo foo 184 Nov 20 12:16 config.php\* -rw-r--r-- 1 foo foo 2830 Sep 24 11:39 CONTRIBUTING.md drwxr-xr-x 5 foo foo 4096 Sep 24 11:39 engine/ -rw-r--r-- 1 foo foo 48007 Sep 24 11:39 eula\_en.txt -rw-r--r-- 1 foo foo 48499 Sep 24 11:39 eula.txt drwxr-xr-x 4 foo foo 4096 Sep 24 11:39 files/ [i][b]-rwxr--r-- 1 foo foo 1960 Nov 20 12:34 .htaccess\*[/b][/i] -rw-rw-r-- 1 foo foo 32689396 Sep 24 11:40 install\_4.3.2\_e6d1f12c47e61fa1c10893665234cf13b6b3e9f0.zip -rw-r--r-- 1 foo foo 34899 Sep 24 11:39 license.txt drwxrwxrwx 2 foo foo 4096 Sep 24 11:39 logs/ drwxr-xr-x 9 foo foo 4096 Sep 24 11:39 media/ -rwxr--r-- 1 foo foo 20 Nov 20 12:07 phpinfo.php\* -rw-r--r-- 1 foo foo 4415 Sep 24 11:39 README.md drwxr-xr-x 5 foo foo 4096 Sep 24 11:39 recovery/ -rw-r--r-- 1 foo foo 3840 Sep 24 11:39 shopware.php drwxr-xr-x 16 foo foo 4096 Sep 24 11:39 templates/ -rw-r--r-- 1 foo foo 13218 Sep 24 11:39 UPGRADE.md drwxr-xr-x 9 foo foo 4096 Sep 24 11:40 vendor/ [/quote] .htaccess: [quote]foo@bar:~ cat /var/www/html/.htaccess  
RewriteEngine on

RewriteBase /

# Https config for the backend

#RewriteCond %{HTTPS} !=on  
#RewriteRule backend/(.\*) https://%{HTTP\_HOST}%{REQUEST\_URI} [L,R=301]

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

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]

# Fix missing authorization-header on fast\_cgi installations

RewriteRule .\* - [E=HTTP\_AUTHORIZATION:%{HTTP:Authorization},L]  
# 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  
  
  
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] Gibt es da irgendwas dran auszusetzen, was ich übersehen habe? Ich würde mich sehr über ein Feedback freuen. Grüße Phil ps: /var/www/html/ ist in der Tat das Stammverzeichnis für Web-Daten

---

<div class="post-metadata">

**Author:** ![TimmeHosting](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/timmehosting/32/15580_2.png) [@TimmeHosting](https://forum.shopware.com/u/TimmeHosting)\
**Post date:** [21. November 2014 um 18:44 UTC](https://forum.shopware.com/t/shopware4-mod-rewrite/23700/2 "2014-11-21T18:44:43Z")

</div>

Prüfe mal, ob mod\_rewrite auch wirklich geladen ist: `apache2 -t -D DUMP\_MODULES` Du kannst Dir auch ein PHP-Skript bauen mit der apache\_get\_modules()-Funktion - s. [http://de2.php.net/apache\_get\_modules](http://de2.php.net/apache%5C_get%5C_modules) .
