janek26
Goto Top

htaccess Problem mit mod rewrite (apache2, debian)

back-to-topHallo Community,

ich habe ein problem mit meinem Webserver. Irgendwie ließt er die .htaccess nicht richtig ein. manche links gehen, manche wiederum nicht, ich bin echt am Ende. Aber vielleicht sehen euere Augen ja mehr als meine Müden es tun...

Bei den Seiten mit dem Kommentar "funktioniert" funktioniert es, und bei den Anderen kommt der default 404 Fehler von Apache. Die Kommentare stehen nicht in meiner echten .htaccess!

mod_rewrite ist aktiv, mehrfach geprüft! & sonst würden wahrscheinlich gar keine Links gehen, manche gehen aber. Es sind immer die selben Rules die funktionieren oder eben nicht funktionieren!

Meine .htaccess
RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteRule ^buy/?$			buy-skins.php			[NC,L]			#funktioniert
RewriteRule ^buy/assets/(.*)$		/assets/$1			[R=301,NC,L]		#funktioniert
RewriteRule ^sell/?$			sell.php			[NC,L]			#funktioniert NICHT!
RewriteRule ^sell/assets/(.*)$		/assets/$1			[R=301,NC,L]		#funktioniert NICHT!
RewriteRule ^profile/?$			profile.php			[NC,L]			#funktioniert NICHT!
RewriteRule ^profile/assets/(.*)$	/assets/$1			[R=301,NC,L]		#funktioniert NICHT!
RewriteRule ^buy/keys/?$		buy-keys.php			[NC,L]			#funktioniert 
RewriteRule ^buy/keys/assets/(.*)$	/assets/$1			[R=301,NC,L]		#funktioniert 
RewriteRule ^buy/cases/?$		buy-cases.php			[NC,L]			#funktioniert 
RewriteRule ^buy/cases/assets/(.*)$	/assets/$1			[R=301,NC,L]		#funktioniert 
RewriteRule ^logout/?$			/assets/steamauth/logout.php	[NC,L]			#funktioniert 

Meine /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName meinedomain.com

        ServerAdmin meinemail@meinedomain.com
        DocumentRoot /var/www

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
        </Directory>
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Hoffe mir wird geholfen, habe da aber bis jetzt sehr gute Erfahrungen mit administrator.de gemacht face-smile


Liebe Grüße,

Janek

Content-Key: 282493

Url: https://administrator.de/contentid/282493

Printed on: April 23, 2024 at 19:04 o'clock

Member: janek26
janek26 Sep 10, 2015 at 09:24:36 (UTC)
Goto Top
OK, also für alle die auch so ein Problem haben beantworte ich meine Frage jetzt selbst, damit ihr nicht verzweifelt!

In der .htaccess ersetzt ihr:
Options +FollowSymLinks


durch:
Options +FollowSymLinks -MultiViews 


Bei mir geht jetzt alles, GELÖST!