Rewrite-Engine
mrx
- php
0 ChrisB0 Thomas0 Der Martin
0 Gunther
Hallo,
seit der Neuinstallation von XAMPP (Version 1.6.8) beim Update auf Windows 7 streikt mein Rewrite Engine-Script in der .htaccess-Datei.
Es soll in dem Ordner wiki,in dem es sich befindet, jede Datei http://localhost/wiki/Startseite in http://localhost/wiki/index.php?thema=Startseite umwandeln.
Stattdessen spuckt es einen Fehler 500 aus.
Da ich leider keine Ahnung davon, ich habe das mehr oder weniger aus dem Internet übernommen. Deshalb meine Bitte: Könnt ihr mir sagen, was ich ändern muss, um den Fehler loszuwerden?
.htaccess
---------
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ index.php?thema=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ index.php?thema=$1 [QSA,L]
ErrorDocument 404 /index.php
Hi,
Stattdessen spuckt es einen Fehler 500 aus.
Dann schau ins Error-Log des Webservers, was dieser dazu genaueres zu sagen hat.
MfG ChrisB
Im Error-Log steht folgendes:
[Mon Oct 12 13:12:48 2009] [notice] Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.6 configured -- resuming normal operations
[Mon Oct 12 13:12:48 2009] [notice] Server built: Jun 14 2008 19:02:12
[Mon Oct 12 13:12:48 2009] [notice] Parent: Created child process 2640
[Mon Oct 12 13:12:49 2009] [notice] Child 2640: Child process is running
[Mon Oct 12 13:12:49 2009] [notice] Child 2640: Acquired the start mutex.
[Mon Oct 12 13:12:49 2009] [notice] Child 2640: Starting 250 worker threads.
[Mon Oct 12 13:12:49 2009] [notice] Child 2640: Starting thread to listen on port 443.
[Mon Oct 12 13:12:49 2009] [notice] Child 2640: Starting thread to listen on port 80.
[Mon Oct 12 13:12:52 2009] [alert] [client 127.0.0.1] D:/My Dropbox/xampplite/htdocs/wiki/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/
[Mon Oct 12 13:12:56 2009] [alert] [client 127.0.0.1] D:/My Dropbox/xampplite/htdocs/wiki/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Mahlzeit!
Im Error-Log steht folgendes:
[...]
[Mon Oct 12 13:12:52 2009] [alert] [client 127.0.0.1] D:/My Dropbox/xampplite/htdocs/wiki/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/
[Mon Oct 12 13:12:56 2009] [alert] [client 127.0.0.1] D:/My Dropbox/xampplite/htdocs/wiki/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Na also, das ist doch schon ein deutlicher Hinweis: Die Direktive RewriteEngine wird nicht erkannt. Hast du das Modul mod_rewrite überhaupt in der Apache-Konfiguration eingebunden? Sieht eher so aus, als ob es nicht an Bord wäre.
So long,
Martin
Hi!
Im Error-Log steht folgendes:
[...]/.htaccess: Invalid command 'RewriteEngine', perhaps [...] defined by a module not included in the server configuration
Das ist vermutlich die Ursache.
Gruß Gunther