tutorials.de Buch-Aktion 05/2012
ERLEDIGT
NEIN
ANTWORTEN
9
ZUGRIFFE
885
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    smyle smyle ist offline Mitglied Gold
    Registriert seit
    Jun 2008
    Beiträge
    217
    Hallo ich mache erstelle mit PHP links die so aussehen können:
    Index.php?news=news oder Index.php?news usw…

    Habe gelesen das man die ? durch / ersetzen kann.
    Dafür müsste man im die Datei .htaccess erstellen und folgendes eingeben:
    Code :
    1
    2
    3
    4
    5
    6
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* /Projekt1/management/index.php
    RewriteRule ^([\w]+)/?([\w]+)? /projekt1/management/index.php?news=$1
    </IfModule>

    Wenn ich den letzten RewriteRule auskommentiere erhalte ich keine Fehlermeldung. Aber sonst erhalte ich folgenden Fehler:


    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, postmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
    ________________________________________
    Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Server at localhost Port 80



    Habe in einem anderen Formu gelesen das man mit diesem Code überprüfen kann ob mod_rewrite aktiviert ist.
    Code :
    1
    2
    
    #RewriteEngine on
    #RewriteRule ^(.*)$ http://www.google.com [R]

    Dies hat funktioniert. Denn wenn man die meine index Datei aufgerufen hat, wurde man automatisch auf die Google Homepage weitergeleitet.

    Weis jemand was ich vielleicht falsch mache?
    Ich habe die Homepage lokal den ich brauche die neue Version von Xampp.

    Wenn ich die PHP info anschaue sollte das mod_rewrite auch aktiviert sein:

    Loaded Modules: core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_auth_digest mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav_lock mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_log_config mod_mime mod_negotiation mod_proxy mod_proxy_ajp mod_rewrite mod_setenvif mod_ssl mod_status mod_php5 mod_perl

     

  2. #2
    kab-media kab-media ist offline Mitglied
    Registriert seit
    Oct 2011
    Beiträge
    23
    Hi,

    im Netz gibt es einige Rewritegeneratoren, wie z.B. http://www.generateit.net/mod-rewrite/ oder
    http://www.webdevstuff.com/127/mod-r...enerateit.html

    Vielleicht findest Du dort Anhaltspunkte, wie man die htaccess aufbauen muss.
     
    Viele Grüße

    kab-media

  3. #3
    Avatar von saftmeister
    saftmeister saftmeister ist offline Der Saft sei mit dir
    tutorials.de Premium-User
    Registriert seit
    May 2006
    Ort
    There is no place like 127.0.0.1
    Beiträge
    3.521
    Nur so als Tipp: Schau doch mal ins error.log deines Apachen, dort sollte der Grund für den 500er drin stehen.
     
    Grüße
    --
    Qualität des Codes wird in WTF's/Min gemessen: Je mehr, desto schlechter der Code ;-)

  4. #4
    smyle smyle ist offline Mitglied Gold
    Registriert seit
    Jun 2008
    Beiträge
    217
    Im Error. Log steht folgendes:
    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    
    [Fri Nov 18 16:09:57 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/Projekt1/management/.htaccess: Invalid command 'ewriteRule', perhaps misspelled or defined by a module not included in the server configuration
    [Fri Nov 18 16:10:25 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/Projekt1/management/.htaccess: Invalid command 'ewriteRule', perhaps misspelled or defined by a module not included in the server configuration
    [Fri Nov 18 16:10:30 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/Projekt1/management/.htaccess: Invalid command 'ewriteRule', perhaps misspelled or defined by a module not included in the server configuration
    [Fri Nov 18 16:10:36 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/Projekt1/management/.htaccess: Invalid command 'ewriteRule', perhaps misspelled or defined by a module not included in the server configuration
    [Fri Nov 18 16:17:48 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/Projekt1/management/index.php-news
    [Fri Nov 18 16:30:38 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/Projekt1/management/Projekt1
    [Fri Nov 18 16:30:56 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:30:56 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:33:38 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:33:38 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:33:39 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:33:39 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:34:20 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:34:20 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:34:35 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:34:35 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:34:45 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:34:45 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:35:10 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:35:10 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:36:38 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:36:38 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:40:14 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:40:14 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:40:30 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:40:30 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:48:25 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:48:25 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:48:44 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:48:44 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:48:46 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:48:46 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:50:42 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:50:42 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:50:58 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:50:58 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:51:10 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:51:10 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:31 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:31 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:38 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:38 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:55 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:55 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:58 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:52:58 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:53:41 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/Projekt1/management/.htaccess: Invalid command '$', perhaps misspelled or defined by a module not included in the server configuration
    [Fri Nov 18 16:53:51 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/Projekt1/management/.htaccess: Invalid command '$', perhaps misspelled or defined by a module not included in the server configuration
    [B][Fri Nov 18 16:53:53 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/Projekt1/management/.htaccess: Invalid command '$', perhaps misspelled or defined by a module not included in the server configuration[/B]
    [Fri Nov 18 16:56:12 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Fri Nov 18 16:56:12 2011] [notice] Child 2852: Exit event signaled. Child process is ending.
    [Fri Nov 18 16:56:13 2011] [notice] Child 2852: Released the start mutex
    [Fri Nov 18 16:56:14 2011] [notice] Child 2852: All worker threads have exited.
    [Fri Nov 18 16:56:14 2011] [notice] Child 2852: Child process is exiting
    [Fri Nov 18 16:56:14 2011] [notice] Parent: Child process exited successfully.
    [Fri Nov 18 16:56:18 2011] [notice] Digest: generating secret for digest authentication ...
    [Fri Nov 18 16:56:18 2011] [notice] Digest: done
    [Fri Nov 18 16:56:19 2011] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
    [Fri Nov 18 16:56:19 2011] [notice] Server built: Sep 10 2011 11:34:11
    [Fri Nov 18 16:56:19 2011] [notice] Parent: Created child process 4840
    [Fri Nov 18 16:56:20 2011] [notice] Digest: generating secret for digest authentication ...
    [Fri Nov 18 16:56:20 2011] [notice] Digest: done
    [Fri Nov 18 16:56:21 2011] [notice] Child 4840: Child process is running
    [Fri Nov 18 16:56:21 2011] [notice] Child 4840: Acquired the start mutex.
    [Fri Nov 18 16:56:21 2011] [notice] Child 4840: Starting 150 worker threads.
    [Fri Nov 18 16:56:21 2011] [notice] Child 4840: Starting thread to listen on port 443.
    [Fri Nov 18 16:56:21 2011] [notice] Child 4840: Starting thread to listen on port 443.
    [Fri Nov 18 16:56:21 2011] [notice] Child 4840: Starting thread to listen on port 80.
    [Fri Nov 18 16:56:21 2011] [notice] Child 4840: Starting thread to listen on port 80.
    [Fri Nov 18 16:56:37 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 16:56:37 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 17:06:39 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Fri Nov 18 17:06:39 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    Beim http://www.generateit.net/mod-rewrite/ erhalte ich denn Vorschlag http://localhost/news.html wenn ich die Adresse http://localhost/projekt1/management....php?news=news eingebe.
    Somit habe ich den generierten Code kopiert wie es in der Anleitung steht und in meiner htaccess eingefügt.
    Hier der Code:
    Code :
    1
    2
    
    RewriteEngine On
    RewriteRule ^([^/]*)\.html$ /projekt1/management/index.php?news=$1 [L]
    Nun erhalte ich zwar keine Fehlermeldung aber die URL wird trotzdem nicht als http://localhost/news.html angepasst.

    Im Log File habe ich nun zusätzlich folgende Einträge:
    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    
    [Mon Nov 21 07:55:03 2011] [notice] Digest: generating secret for digest authentication ...
    [Mon Nov 21 07:55:03 2011] [notice] Digest: done
    [Mon Nov 21 07:55:04 2011] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
    [Mon Nov 21 07:55:04 2011] [notice] Server built: Sep 10 2011 11:34:11
    [Mon Nov 21 07:55:04 2011] [notice] Parent: Created child process 2588
    [Mon Nov 21 07:55:05 2011] [notice] Digest: generating secret for digest authentication ...
    [Mon Nov 21 07:55:05 2011] [notice] Digest: done
    [Mon Nov 21 07:55:06 2011] [notice] Child 2588: Child process is running
    [Mon Nov 21 07:55:06 2011] [notice] Child 2588: Acquired the start mutex.
    [Mon Nov 21 07:55:06 2011] [notice] Child 2588: Starting 150 worker threads.
    [Mon Nov 21 07:55:06 2011] [notice] Child 2588: Starting thread to listen on port 443.
    [Mon Nov 21 07:55:06 2011] [notice] Child 2588: Starting thread to listen on port 443.
    [Mon Nov 21 07:55:06 2011] [notice] Child 2588: Starting thread to listen on port 80.
    [Mon Nov 21 07:55:06 2011] [notice] Child 2588: Starting thread to listen on port 80.
    [Mon Nov 21 08:30:11 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Mon Nov 21 08:30:11 2011] [notice] Child 2588: Exit event signaled. Child process is ending.
    [Mon Nov 21 08:30:12 2011] [notice] Child 2588: Released the start mutex
    [Mon Nov 21 08:30:13 2011] [notice] Child 2588: All worker threads have exited.
    [Mon Nov 21 08:30:13 2011] [notice] Child 2588: Child process is exiting
    [Mon Nov 21 08:30:13 2011] [notice] Parent: Child process exited successfully.
    [Mon Nov 21 08:30:16 2011] [notice] Digest: generating secret for digest authentication ...
    [Mon Nov 21 08:30:16 2011] [notice] Digest: done
    [Mon Nov 21 08:30:17 2011] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
    [Mon Nov 21 08:30:17 2011] [notice] Server built: Sep 10 2011 11:34:11
    [Mon Nov 21 08:30:17 2011] [notice] Parent: Created child process 7156
    [Mon Nov 21 08:30:17 2011] [notice] Digest: generating secret for digest authentication ...
    [Mon Nov 21 08:30:17 2011] [notice] Digest: done
    [Mon Nov 21 08:30:18 2011] [notice] Child 7156: Child process is running
    [Mon Nov 21 08:30:18 2011] [notice] Child 7156: Acquired the start mutex.
    [Mon Nov 21 08:30:18 2011] [notice] Child 7156: Starting 150 worker threads.
    [Mon Nov 21 08:30:18 2011] [notice] Child 7156: Starting thread to listen on port 443.
    [Mon Nov 21 08:30:18 2011] [notice] Child 7156: Starting thread to listen on port 443.
    [Mon Nov 21 08:30:18 2011] [notice] Child 7156: Starting thread to listen on port 80.
    [Mon Nov 21 08:30:18 2011] [notice] Child 7156: Starting thread to listen on port 80.
    [Mon Nov 21 08:35:22 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Mon Nov 21 08:35:22 2011] [notice] Child 7156: Exit event signaled. Child process is ending.
    [Mon Nov 21 08:35:23 2011] [notice] Child 7156: Released the start mutex
    [Mon Nov 21 08:35:24 2011] [notice] Child 7156: All worker threads have exited.
    [Mon Nov 21 08:35:24 2011] [notice] Child 7156: Child process is exiting
    [Mon Nov 21 08:35:24 2011] [notice] Parent: Child process exited successfully.
    [Mon Nov 21 08:35:26 2011] [notice] Digest: generating secret for digest authentication ...
    [Mon Nov 21 08:35:26 2011] [notice] Digest: done
    [Mon Nov 21 08:35:26 2011] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
    [Mon Nov 21 08:35:26 2011] [notice] Server built: Sep 10 2011 11:34:11
    [Mon Nov 21 08:35:26 2011] [notice] Parent: Created child process 4928
    [Mon Nov 21 08:35:27 2011] [notice] Digest: generating secret for digest authentication ...
    [Mon Nov 21 08:35:27 2011] [notice] Digest: done
    [Mon Nov 21 08:35:28 2011] [notice] Child 4928: Child process is running
    [Mon Nov 21 08:35:28 2011] [notice] Child 4928: Acquired the start mutex.
    [Mon Nov 21 08:35:28 2011] [notice] Child 4928: Starting 150 worker threads.
    [Mon Nov 21 08:35:28 2011] [notice] Child 4928: Starting thread to listen on port 443.
    [Mon Nov 21 08:35:28 2011] [notice] Child 4928: Starting thread to listen on port 443.
    [Mon Nov 21 08:35:28 2011] [notice] Child 4928: Starting thread to listen on port 80.
    [Mon Nov 21 08:35:28 2011] [notice] Child 4928: Starting thread to listen on port 80.
    [Mon Nov 21 08:36:23 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: [url]http://localhost/projekt1/management/index.php[/url]
    [Mon Nov 21 08:36:23 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: [url]http://localhost/projekt1/management/index.php[/url]
    [Mon Nov 21 08:36:30 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Mon Nov 21 08:36:30 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    Denn Apache Server habe ich nach der Änderung im htaccess auch neugestartet. Die .htaccess Datei befindet sich übrigens im Ordner http://localhost/projekt1/management/.

    Ich habe die htaccess auch schon gelöscht und neu hin kopiert / erstellt.

    Habt ihr noch eine Idee?

    edit:
    Habe es noch mit verschiedenen Generator versuch und die folgenden Code erhalten:
    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    
    #RewriteEngine On
    #RewriteRule ^([^/]*)\.html$ /projekt1/management/index.php?news=$1 [L]
     
    #Options +FollowSymLinks
    #RewriteEngine on
    #RewriteRule Projekt(.*)\.htm$ /projekt1/management/index.php?news=$1
     
    #Options +FollowSymLinks
    #RewriteEngine on
    #RewriteRule index/(.*)/(.*)/$ /projekt1/management/index.php?$1=$2
     
     
    #Options +FollowSymLinks
    #RewriteEngine on
    #RewriteRule http://localhost/index/(.*)/(.*)/$ /projekt1/management/index.php?$1=$2

    Keines davon hat ein Fehler gegeben. Jedoch hat auch keins funktioniert.

    Gruss
    Smyle
    Geändert von sheel (21.11.11 um 11:30 Uhr) Grund: Doppel && Scrollleisten
     

  5. #5
    Avatar von saftmeister
    saftmeister saftmeister ist offline Der Saft sei mit dir
    tutorials.de Premium-User
    Registriert seit
    May 2006
    Ort
    There is no place like 127.0.0.1
    Beiträge
    3.521
    Bist du dir im Klaren darüber, das die alle auskommentiert sind (also nicht als Regeln anerkannt werden)?
     
    Grüße
    --
    Qualität des Codes wird in WTF's/Min gemessen: Je mehr, desto schlechter der Code ;-)

  6. #6
    smyle smyle ist offline Mitglied Gold
    Registriert seit
    Jun 2008
    Beiträge
    217
    Ja das weis ich schon. Natürlich hatte ich die # zum Testen herusgenommen.
    Hat trotzdem nicht funktioniert.
    Geändert von smyle (21.11.11 um 16:35 Uhr)
     

  7. #7
    threadi threadi ist offline Mitglied Brokat
    Registriert seit
    Dec 2006
    Ort
    Leipzig
    Beiträge
    478
    Was davon hast Du nicht mehr auskommentiert? Zeig ein Beispiel was Du verwendet hast und was nicht ging.

    Und: bist Du sicher, dass mod_rewrite auf deinem Server vorhanden ist?
     

  8. #8
    Avatar von saftmeister
    saftmeister saftmeister ist offline Der Saft sei mit dir
    tutorials.de Premium-User
    Registriert seit
    May 2006
    Ort
    There is no place like 127.0.0.1
    Beiträge
    3.521
    Ok, lassen wir die erste Version mal Revue passieren:

    Code :
    1
    2
    
    RewriteRule .* /Projekt1/management/index.php
    RewriteRule ^([\w]+)/?([\w]+)? /projekt1/management/index.php?news=$1

    Hier erstellst du eine Regel für quasi alle Requests (.*) die auf index.php weiter leitet. Soweit so gut. Als nächstes erstellst du eine weitere Wild-Card-Regel, die ebenfalls auf index.php mit den GET-Parametern news=$1. Das schließt die vorige Rule mit ein, also auch die Weiterleitung auf index.php. Das dürfte deine Rekursion sein, die mod_rewrite auch folgerichtig anmeckert.

    Du schreibst im ersten Post, das du Links hast, die

    - index.php?news=news
    - index.php?news

    lauten können. Und was genau bezweckst du mit der Rewrite-Rule? Was macht dein PHP-Code mit den GET-Parametern genau?
     
    Grüße
    --
    Qualität des Codes wird in WTF's/Min gemessen: Je mehr, desto schlechter der Code ;-)

  9. #9
    smyle smyle ist offline Mitglied Gold
    Registriert seit
    Jun 2008
    Beiträge
    217
    Also mein PHP liest heraus ob es index.php?news nicht leer ist.
    Wenn dies nicht leer ist dann includet er eine andere Datei. Das heisst, im Haupt Bereich werden die, in diesem Fall, News angezeigt.

    Was ich aber zukünftig machen möchte ist zu überprüfen ob index.php?news=news ist. Daher die beiden Varianten.

    Hier noch der Code abschnitt:
    PHP-Code:
                    if(isset($_GET['account']))
                    {     
                      echo 
    "<div style='margin:10px;'>";             
                        
    $x 0;
                        if(isset(
    $_POST['img']))
                        {
                         
    $x++;
                         include 
    'account/upload.php';
                         
    //include 'account/upload2.php';
                        
    }
                        else
                        {
                         include
    'account/index.php';
                        }
                      echo
    "</div>";        
                    }                
                    else if(isset(
    $_GET['news']))
                    {
                     include
    'news/index.php';
                    }
                    else
                    {
                     echo 
    "<div style='margin:10px;'>";
                     include
    'home/index.php';
                     echo 
    "</div>";
                    } 
    Ist indem fall der htaccess Code falsch?

    Ich möchte mod_rewrite gebrauchen da das dann im Browser schöner aussieht und für die Suchmaschinen auch besser ist. Also so wurde mir das jedenfalls erklärt.

    Ich habe noch disen Tutorial angeschaut: http://edrackham.com/apache/beginners-mod_rewrite-tutorial/

    Habe nun folgende php Datei:

    PHP-Code:
        <a href="product.php?product_id=19">text</a>
        <a href="product/25/">text2</a>
        <a href="product/18/">text2</a>
        <a href="product/news/">text3</a>

        You are viewing product <?php echo $_REQUEST['product_id']; echo"<br>".$_GET['product_id']; ?>


    Wenn ich den ersten Link wähle bleibt der Link im Browser so: http://localhost/projekte/test/product. ... duct_id=19
    Wenn ich den zweiten Link wähle, sihet dier Link im Browser so aus: http://localhost/projekte/test/product/25/
    Wenn ich, nachdem ich den zweiten Link gewählt habe denn dritten wähle funktioniert das lieder nicht, da der Link so aussieht: http://localhost/projekte/test/product/25/product/18/

    Beim wählen des dritten Links sollte der zweite eigentlich überschrieben werden und nicht erweitert.
    Wie funktioniert das?

    Im htaccess sieht der Code so aus:


    Code :
    1
    2
    3
    4
    
            Options +FollowSymLinks 
            Options +Indexes 
            RewriteEngine On
        RewriteRule ^product/([0-9]+)/$ product.php?product_id=$1 [NC,L]

    Bitte helft mir, ich bin verzweifelt und weiss nicht weiter

    Hallo Zäme

    Ich konnte das nun folgendermassen lösen:
    Code :
    1
    2
    3
    4
    
    Options +FollowSymLinks 
    Options +Indexes 
    RewriteEngine On
    RewriteRule ^([^/]*)\.html$ /projekt1/management/loggedIn.php?$1=$2 [NC,L]

    Das heisst ich habe beispielsweisen den Link home.html was eigentlich index.php?home=1 wäre.
    Mit $_GET['home'] überprüfe ich ob etwas in der Variable home gesetzt ist. Also steht nun im Webbrowser anstelle von index.php?home einfach nur home.html.

    Nun möchte ich jedoch zusätzlich folgenden Code:
    Code :
    1
    
    RewriteRule ^([^/]*)\.html$ /projekt1/management/index.php?$1=$2 [NC,L]
    Jedoch wenn ich mich in der index.php Datei bedfinde funktioniert das nicht. und wenn ich in der LoggedIn.php Datei befinde, funktioniert das.

    Habe das noch folgendermassen versucht:
    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    
    Options +FollowSymLinks 
    Options +Indexes 
    RewriteEngine On
     
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
     
    RewriteCond %{SCRIPT_FILENAME} !index\.php
    RewriteRule ^([^/]*)\.html$ /projekte/projekt1/loggedIn.php?$1=$2  [NC,L]
     
    RewriteCond %{SCRIPT_FILENAME} !loggedIn\.php
    RewriteRule ^([^/]*)\.html$ /projekte/projekt1/index.php?$1=$2 [NC,L]

    Kann mir hier niemand helfen?

    Ist denn niemand da der eine idee zu meinem Problem hat?
    Geändert von sheel (03.01.12 um 14:11 Uhr) Grund: Vierfachpost
     

  10. #10
    Avatar von Raisch
    Raisch Raisch ist offline extraordinary bit
    Registriert seit
    Aug 2011
    Ort
    Berlin
    Beiträge
    333
    Mir scheint, Du hast einen Fehler in deinen Rewriteregeln.

    Du hast in deinen regulären Ausdrücken nur eine Gruppe die als Ergebnis zwischengespeichert wird, greifst aber auf 2 zu:
    RewriteRule ^([^/]*)\.html$ /projekte/projekt1/index.php?$1=$2 [NC,L]

    Probieren kannst Du es ja mal in der Form:
    Code :
    1
    
    RewriteRule ^([^/]*)\.html$ /projekte/projekt1/index.php?home=$1 [NC,L]
    oder:
    Code :
    1
    
    RewriteRule ^([^/]*)\.([^/]*)\.html$ /projekte/projekt1/index.php?$1=$2 [NC,L]

    Gruß
    Geändert von sheel (03.01.12 um 14:10 Uhr) Grund: Vollzitat
     

Ähnliche Themen

  1. htaccess php?
    Von tscharlie im Forum PHP
    Antworten: 3
    Letzter Beitrag: 19.08.09, 21:26
  2. seit Ubuntu heißt .htaccess uft8.htaccess und geht nicht mehr?
    Von supersalzi im Forum Hosting & Webserver
    Antworten: 4
    Letzter Beitrag: 17.08.09, 17:21
  3. .htaccess
    Von trc120 im Forum Hosting & Webserver
    Antworten: 5
    Letzter Beitrag: 08.07.09, 22:16
  4. Antworten: 29
    Letzter Beitrag: 15.02.05, 03:08
  5. HTAccess
    Von Kyrodust im Forum HTML-Editoren
    Antworten: 1
    Letzter Beitrag: 16.07.03, 16:05

Stichworte