Seite 1 von 1

Zwei Scripte eine .htaccess

Verfasst: 23.07.2012 12:02
von RobertX
Moin Moin,
ich habe zwei Scripte installiert, ein Fotohosterscript und ein Url Shortener Script. Beide Scripte haben eine .htaccess Datei, die ich versucht habe in eine .htaccess Datei zu vereinen. Leider funktioniert das Url Shortener Script dann nicht.

Fotohostingscript .htaccess

Code: Alles auswählen

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule ^([a-z0-9\_\.]+).html$ index.php?seite=$1 [L,QSA]
#/de.matpo.mihs
	RewriteRule ^profil-([0-9]+).html$ index.php?seite=mitglieder.$1 [L,QSA]
	RewriteRule ^display-([a-z0-9]+).html$ index.php?seite=display&img=$1 [L,QSA]
	RewriteRule ^display.([a-z0-9]+)-([a-z0-9]+).html$ index.php?seite=display.$1&img=$2 [L,QSA]
	RewriteRule ^images-([a-z0-9]+).([a-z0-9]+)$ images.php?img=$1
	RewriteRule ^(thumb|ihsthumb)-([a-z0-9]+).([a-z0-9]+)$ images.php?img=$2,$1
#/de.matpo.mihs.mihs
#de.matpo.mihs.page.faq
		RewriteRule ^faq-([a-z0-9\_\.]+).html$ index.php?seite=faq&item=$1 [L,QSA]
#/de.matpo.mihs.mihs.page.faq
#de.matpo.mihs.extrathumbs
		RewriteRule ^mythumb/([0-9]+)x([0-9]+)/([0-9])/(.*)$ mythumb.php?width=$1&height=$2&strech=$3&img=$4 [L,QSA]
#/de.matpo.mihs.extrathumbs
#de.matpo.mihs.page.webmaster
		RewriteRule ^uploadbox-([a-z0-9]+).js$ index.php?seite=webmaster.uploadbox.$1 [L,QSA]
#/de.matpo.mihs.page.webmaster
#de.matpo.mfw.page.mod_rewrite.add#
</IfModule>
# Text für individuelle Fehleranzeige
ErrorDocument 401 /index.php
ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
ErrorDocument 410 /index.php
ErrorDocument 500 /index.php
Url Shortener .htaccess

Code: Alles auswählen

RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.+)\!$
RewriteRule ^(.*) stats.php?url=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~s$
RewriteRule ^(.*) stats.php?url=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~q$
RewriteRule ^(.*) generate_qr.php?url=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~p$
RewriteRule ^(.*) preview_url.php?url=$1 [L]
RewriteCond %{REQUEST_URI} !^(.+)\.html$
RewriteCond %{REQUEST_URI} !^(.+)\.htm$
RewriteCond %{REQUEST_URI} !^(.+)\.php$
RewriteCond %{REQUEST_URI} !^(.+)\.js$
RewriteCond %{REQUEST_URI} !^(.+)\.css$
RewriteCond %{REQUEST_URI} !^(.+)\.jpg$
RewriteCond %{REQUEST_URI} !^(.+)\.png$
RewriteCond %{REQUEST_URI} !^(.+)\.gif$
RewriteCond %{REQUEST_URI} !^(.+)\.swf$
RewriteCond %{REQUEST_URI} !^(.+)\.xml$
RewriteCond %{REQUEST_URI} !^(.+)\.ico$
RewriteCond %{REQUEST_URI} !^(.+)\.txt$
RewriteCond %{REQUEST_URI} !^index\.html$
RewriteCond %{REQUEST_URI} !^index\.php$
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^(.+)/$
RewriteRule ^(.*) url_redirector.php?url=$1 [L]
RewriteRule ^(.*).html$ $1.php [L]
Und beide zusammen

Code: Alles auswählen

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule ^([a-z0-9\_\.]+).html$ index.php?seite=$1 [L,QSA]
#/de.matpo.mihs
	RewriteRule ^profil-([0-9]+).html$ index.php?seite=mitglieder.$1 [L,QSA]
	RewriteRule ^display-([a-z0-9]+).html$ index.php?seite=display&img=$1 [L,QSA]
	RewriteRule ^display.([a-z0-9]+)-([a-z0-9]+).html$ index.php?seite=display.$1&img=$2 [L,QSA]
	RewriteRule ^images-([a-z0-9]+).([a-z0-9]+)$ images.php?img=$1
	RewriteRule ^(thumb|ihsthumb)-([a-z0-9]+).([a-z0-9]+)$ images.php?img=$2,$1
#/de.matpo.mihs.mihs
#de.matpo.mihs.page.faq
		RewriteRule ^faq-([a-z0-9\_\.]+).html$ index.php?seite=faq&item=$1 [L,QSA]
#/de.matpo.mihs.mihs.page.faq
#de.matpo.mihs.extrathumbs
		RewriteRule ^mythumb/([0-9]+)x([0-9]+)/([0-9])/(.*)$ mythumb.php?width=$1&height=$2&strech=$3&img=$4 [L,QSA]
#/de.matpo.mihs.extrathumbs
#de.matpo.mihs.page.webmaster
		RewriteRule ^uploadbox-([a-z0-9]+).js$ index.php?seite=webmaster.uploadbox.$1 [L,QSA]
#/de.matpo.mihs.page.webmaster
#de.matpo.mfw.page.mod_rewrite.add#
</IfModule>
# Text für individuelle Fehleranzeige
ErrorDocument 401 /index.php
ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
ErrorDocument 410 /index.php
ErrorDocument 500 /index.php
RewriteCond %{REQUEST_URI} ^(.+)\!$
RewriteRule ^(.*) stats.php?url=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~s$
RewriteRule ^(.*) stats.php?url=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~q$
RewriteRule ^(.*) generate_qr.php?url=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~p$
RewriteRule ^(.*) preview_url.php?url=$1 [L]
RewriteCond %{REQUEST_URI} !^(.+)\.html$
RewriteCond %{REQUEST_URI} !^(.+)\.htm$
RewriteCond %{REQUEST_URI} !^(.+)\.php$
RewriteCond %{REQUEST_URI} !^(.+)\.js$
RewriteCond %{REQUEST_URI} !^(.+)\.css$
RewriteCond %{REQUEST_URI} !^(.+)\.jpg$
RewriteCond %{REQUEST_URI} !^(.+)\.png$
RewriteCond %{REQUEST_URI} !^(.+)\.gif$
RewriteCond %{REQUEST_URI} !^(.+)\.swf$
RewriteCond %{REQUEST_URI} !^(.+)\.xml$
RewriteCond %{REQUEST_URI} !^(.+)\.ico$
RewriteCond %{REQUEST_URI} !^(.+)\.txt$
RewriteCond %{REQUEST_URI} !^url_shortener\.html$
RewriteCond %{REQUEST_URI} !^url_shortener\.php$
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^(.+)/$
RewriteRule ^(.*) url_redirector.php?url=$1 [L]
RewriteRule ^(.*).html$ $1.php [L]
Irgendwie müssen die sich wohl stören. Kann mir jemand sagen wo das Problem liegen könnte?

p.s. die Fotohostingscript .htaccess greift in die .htaccess des Url Shorteners ein. Der Url Shortener möchte auch mit .html Dateien arbeiten, nur das Fotohostingscript zeigt dann immer eine fehlerseite an. Ich glube mit .php sollte es auch gehen können. Wie kann man das umschreiben? Also das der Url Shortener mit .php statt .html arbeitet?