Zur Navigation

URL Rewrite diverser unterseiten mit variablen

1 alex

Ich würde gerne folgende unterseite da diese nicht mehr existieren auf die Haupt/Seite umleiten.

1.
meinedomain.de/?s=seite-unity

würde ich gerne auf

meinedomain.de/news/view/1/

umleiten.

2.
Dann habe ich etliche Seiten mit

meinedomain.de/profil/?s=index&tmpl=de&showid=4353
meinedomain.de/profil/?s=index&tmpl=de&showid=4384 (usw.)
meinedomain.de/fotos/?s=detail&tmpl=de&id=2385
meinedomain.de/fotos/?s=detail&tmpl=de&id=2466 (usw.)

die würde ich gerne auf die Hauptseite umleiten.

meinedomain.de



Würde mich freuen wenn mir jemand erklären könnte was ich dafür in meine htaccess eintragen muss.?

mfg
Alex

03.10.2010 23:27 | geändert: 03.10.2010 23:28

2 Jörg

Die Variablen werden im Query String übertragen (der Teil der URL nach dem "?") - diesen kannst du in einer RewriteCond berücksichtigen:

RewriteEngine on
RewriteCond %{QUERY_STRING} s=seite-unity
RewriteRule ^$ http://meinedomain.de/news/view/1/ [R=301,L]

zu 2. verfährst du analog; wenn sich die Weiterleitung pauschal auf alle showid Nummern bezieht, kannst du den Query String einfach hinten offen lassen, um die betreffenden URLs alle mit einer Regel zu erfassen:

RewriteCond %{QUERY_STRING} s=index&tmpl=de&showid=
RewriteRule ^profil/$ http://meinedomain.de/[R=301,L]

04.10.2010 00:16

3 alex

Hallo Jörg

Danke schon einmal für deine schnelle Reaktion und deiner Hilfe.

zu 1.

Jetzt wird zu der richten Seite umgeleitet bzw. angezeigt aber in der url wird dann folgendes angehängt.

meinedomain.de/news/view/1/?s=flirt-abc

Bei der 2. Regel.

Irgendwie gleiches Problem wie oben es wird zwar die Startseite angezeigt aber in der url wird folgendes angehängt.

meinedomain.de/?s=index&tmpl=de&showid=3419

Ich habe hier hinten den Query String offen gelassen.

Folgende Regeln sind bereits in der htaccess eingetragen kann es sein das es zu einem konflikt kommt.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9a-zA-Z_\-]+)/?$ index.php?m=member_profile&p=profile&id=$1 [L]

und

RewriteRule ^news/?$ index.php?m=news [L]
RewriteRule ^news/([0-9]+)/?$ index.php?m=news&page=$1 [L]
RewriteRule ^news/view/([0-9]+)[a-zA-Z0-9\-]*/?$ index.php?m=news&p=view&id=$1 [L]
RewriteRule ^news/rss/?$ index.php?m=news&p=rss [L]

mfg
Alex

04.10.2010 11:13

4 Jörg

Die Weiterleitungen sollten sich oberhalb der anderen Rules befinden.

04.10.2010 12:27

5 alex

mhmm

stehen auch oberhalb.

Gibt es noch eine andere möglichkeit oder was könnte ich falsch gemacht haben.?

04.10.2010 17:06

6 Jörg

Die Weiterleitungen stehen direkt unterhalb "RewriteEngine on" und haben das L-Flag?

Vielleicht kannst du auch nochmal die vollständige htaccess Datei posten

04.10.2010 22:55

7 alex

Hallo,

Klar hier ist meine komplette htaccess.


RewriteEngine on

################################################################
#####################  Eigene umleitungen  #####################
################################################################

RewriteCond %{HTTP_HOST} !^www\.meinedomain\.de$
RewriteRule ^(.*)$ http://www.meinedomain.de/$1 [L,R=301]



RewriteCond %{QUERY_STRING} s=index&tmpl=de&showid=
RewriteRule ^profil/$ http://www.meinedomain.de/ [R=301,L]



RewriteCond %{QUERY_STRING} s=online-abc
RewriteRule ^$ http://www.meinedomain.de/news/view/1/ [R=301,L]


################################################################
##################### MEMBER ACCOUNT PAGES #####################
################################################################
<IfModule mod_rewrite.c>



## account
RewriteRule ^account/?$ index.php?m=account_login [L]


## lost password
RewriteRule ^account/lostpass/?$ index.php?m=account_lostpass [L]
RewriteRule ^account/lostpass/([0-9]+)/([0-9A-Za-z]+)/?$ index.php?m=account_lostpass&id=$1&hash=$2 [L]


## activate
RewriteRule ^account/activate/([0-9]+)/([0-9A-Za-z]+)/?$ index.php?m=account_activate&id=$1&hash=$2&a=1 [L]
RewriteRule ^account/decline/([0-9]+)/([0-9A-Za-z]+)/?$ index.php?m=account_activate&id=$1&hash=$2&a=2 [L]


## home, login, logout, register, settings, notifications, privacy
RewriteRule ^account/(home|login|logout|register|sendhash|settings|notifications|privacy)/?$ index.php?m=account_$1 [L]
RewriteRule ^account/privacy/cancel/?$ index.php?m=account_privacy&p=cancel [L]


## photo
RewriteRule ^account/photo/?$ index.php?m=account_photo [L]
RewriteRule ^account/photo/(delete|thumbnail)/?$ index.php?m=account_photo&p=$1 [L]


## home, profile
RewriteRule ^account/profile(/([0-9A-Za-z]+))?/?$ index.php?m=account_profile&group=$2 [L]


## chat
RewriteRule ^account/chat/([0-9]+)/(request|deny)/?$ index.php?m=account_chat&p=$2&id=$1 [L]
RewriteRule ^account/chat/([0-9]+)/?$ index.php?m=account_chat&id=$1 [L]


## messages
RewriteRule ^account/messages/?$ index.php?m=account_messages [L]
RewriteRule ^account/messages/(inbox|sent)(/([0-9]+))?/?$ index.php?m=account_messages&p=$1&page=$3 [L]
RewriteRule ^account/messages/inbox/read/([0-9]+)/?$ index.php?m=account_messages&p=iview&id=$1 [L]
RewriteRule ^account/messages/sent/read/([0-9]+)/?$ index.php?m=account_messages&p=sview&id=$1 [L]
RewriteRule ^account/messages/inbox/delete/([0-9]+)/?$ index.php?m=account_messages&p=idelete&page=$1 [L]
RewriteRule ^account/messages/sent/delete/([0-9]+)/?$ index.php?m=account_messages&p=sdelete&page=$1 [L]
RewriteRule ^account/messages/compose/?$ index.php?m=account_messages&p=compose [L]
RewriteRule ^account/messages/compose/([0-9]+)(/([0-9]+))?/?$ index.php?m=account_messages&p=compose&id=$1&sid=$2 [L]
RewriteRule ^account/messages/quick/([0-9]+)/([0-9]+)/?$ index.php?m=account_messages&p=quickmessage&id=$1&sid=$2 [L]


## gifts
RewriteRule ^account/gifts/?$ index.php?m=account_gifts [L]
RewriteRule ^account/gifts/(inbox|sent)(/([0-9]+))?/?$ index.php?m=account_gifts&p=$1&page=$3 [L]
RewriteRule ^account/gifts/view/([0-9]+)/?$ index.php?m=account_gifts&p=view&id=$1 [L]
RewriteRule ^account/gifts/inbox/delete/([0-9]+)/?$ index.php?m=account_gifts&p=idelete&page=$1 [L]
RewriteRule ^account/gifts/sent/delete/([0-9]+)/?$ index.php?m=account_gifts&p=sdelete&page=$1 [L]
RewriteRule ^account/gifts/send/([0-9]+)/?$ index.php?m=account_gifts&p=send&id=$1 [L]


## guestbook
RewriteRule ^account/guestbook/?$ index.php?m=account_guestbook [L]
RewriteRule ^account/guestbook/(approved|unapproved)/?$ index.php?m=account_guestbook&p=$1 [L]
RewriteRule ^account/guestbook/(approved|unapproved)/([0-9]+)/?$ index.php?m=account_guestbook&p=$1&page=$2 [L]
RewriteRule ^account/guestbook/(approve|delete)/([0-9]+)/([0-9]+)/?$ index.php?m=account_guestbook&p=$1&page=$2&id=$3 [L]


## blog
RewriteRule ^account/blog/?$ index.php?m=account_blog [L]
RewriteRule ^account/blog/([0-9]+)/?$ index.php?m=account_blog&p=entries&page=$1 [L]
RewriteRule ^account/blog/add/?$ index.php?m=account_blog&p=edit&id=0 [L]
RewriteRule ^account/blog/edit/([0-9]+)/?$ index.php?m=account_blog&p=edit&id=$1 [L]
RewriteRule ^account/blog/delete/([0-9]+)/([0-9]+)/?$ index.php?m=account_blog&p=delete&page=$1&id=$2 [L]
RewriteRule ^account/blog/comments/([0-9]+)/?$ index.php?m=account_blog&p=comments&id=$1 [L]
RewriteRule ^account/blog/comments/([0-9]+)/([0-9]+)/?$ index.php?m=account_blog&p=comments&id=$1&page=$2 [L]
RewriteRule ^account/blog/comments/delete/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_blog&p=deletecomment&id=$1&sid=$2&page=$3 [L]


## blocked
RewriteRule ^account/blocked/?$ index.php?m=account_blocked [L]
RewriteRule ^account/blocked/([0-9]+)/?$ index.php?m=account_blocked&page=$1 [L]
RewriteRule ^account/blocked/add/([0-9]+)/?$ index.php?m=account_blocked&p=add&id=$1 [L]
RewriteRule ^account/blocked/delete/([0-9]+)/([0-9]+)/?$ index.php?m=account_blocked&p=delete&id=$2&page=$1 [L]


## favorites
RewriteRule ^account/favorites/?$ index.php?m=account_favorites [L]
RewriteRule ^account/favorites/([0-9]+)/?$ index.php?m=account_favorites&page=$1 [L]
RewriteRule ^account/favorites/(online|fans)/?$ index.php?m=account_favorites&p=$1 [L]
RewriteRule ^account/favorites/fans/([0-9]+)/?$ index.php?m=account_favorites&p=fans&page=$1 [L]
RewriteRule ^account/favorites/add/([0-9]+)/?$ index.php?m=account_favorites&p=add&id=$1 [L]
RewriteRule ^account/favorites/delete/([0-9]+)/([0-9]+)/?$ index.php?m=account_favorites&p=delete&id=$2&page=$1 [L]


## friends
RewriteRule ^account/friends/?$ index.php?m=account_friends [L]
RewriteRule ^account/friends/([0-9]+)/?$ index.php?m=account_friends&page=$1 [L]
RewriteRule ^account/friends/(online|requests)/?$ index.php?m=account_friends&p=$1 [L]
RewriteRule ^account/friends/add/([0-9]+)/?$ index.php?m=account_friends&p=add&id=$1 [L]
RewriteRule ^account/friends/delete/([0-9]+)/([0-9]+)/?$ index.php?m=account_friends&p=delete&id=$2&page=$1 [L]
RewriteRule ^account/friends/accept/([0-9]+)/?$ index.php?m=account_friends&p=accept&id=$1 [L]


## visitors
RewriteRule ^account/visitors/?$ index.php?m=account_visitors [L]
RewriteRule ^account/visitors/([0-9]+)/?$ index.php?m=account_visitors&page=$1 [L]
RewriteRule ^account/visitors/add/([0-9]+)/?$ index.php?m=account_visitors&p=add&id=$1 [L]


## upgrade
RewriteRule ^account/upgrade/?$ index.php?m=account_upgrade [L]
RewriteRule ^account/upgrade/(credits|orders|success|failure)/?$ index.php?m=account_upgrade&p=$1 [L]
RewriteRule ^account/upgrade/payment/([0-9]+)/?$ index.php?m=account_upgrade&p=payment&id=$1 [L]
RewriteRule ^account/upgrade/ipn/([0-9a-zA-Z]+)/?$ index.php?m=account_upgrade&p=ipn&id=$1 [L]


## music, albums, videos, events
RewriteRule ^account/(audio|albums|videos|events)/?$ index.php?m=account_$1 [L]
RewriteRule ^account/(audio|albums|videos|events)/([0-9]+)/?$ index.php?m=account_$1&page=$2 [L]
RewriteRule ^account/(audio|albums|videos|events)/add/?$ index.php?m=account_$1&p=add [L]
RewriteRule ^account/(audio|albums|videos|events)/edit/([0-9]+)/?$ index.php?m=account_$1&p=edit&id=$2 [L]
RewriteRule ^account/(audio|albums|videos|events)/delete/([0-9]+)/([0-9]+)/?$ index.php?m=account_$1&p=delete&id=$3&page=$2 [L]

RewriteRule ^account/videos/comments/([0-9]+)/?$ index.php?m=account_videos&p=comments&id=$1 [L]
RewriteRule ^account/videos/comments/([0-9]+)/([0-9]+)/?$ index.php?m=account_videos&p=comments&id=$1&page=$2 [L]
RewriteRule ^account/videos/comments/delete/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_videos&p=deletecomment&id=$1&sid=$2&page=$3 [L]


## pictures
RewriteRule ^account/pictures/?$ index.php?m=account_albums [L]
RewriteRule ^account/pictures/([0-9]+)/?$ index.php?m=account_pictures&aid=$1 [L]
RewriteRule ^account/pictures/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&aid=$1&page=$2 [L]
RewriteRule ^account/pictures/add/([0-9]+)/?$ index.php?m=account_pictures&p=add&aid=$1 [L]
RewriteRule ^account/pictures/edit/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&p=edit&aid=$1&id=$2 [L]
RewriteRule ^account/pictures/thumbnail/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&p=thumbnail&aid=$1&id=$2 [L]
RewriteRule ^account/pictures/delete/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&p=delete&page=$1&aid=$2&id=$3 [L]
RewriteRule ^account/pictures/primary/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&p=primary&page=$1&aid=$2&id=$3 [L]
RewriteRule ^account/pictures/comments/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&p=comments&aid=$1&id=$2 [L]
RewriteRule ^account/pictures/comments/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&p=comments&aid=$1&id=$2&page=$3 [L]
RewriteRule ^account/pictures/comments/delete/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_pictures&p=deletecomment&aid=$1&id=$2&sid=$3&page=$4 [L]


## events extra
RewriteRule ^account/events/joined/?$ index.php?m=account_events&p=joined [L]
RewriteRule ^account/events/joined/([0-9]+)/?$ index.php?m=account_events&p=joined&page=$1 [L]
RewriteRule ^account/events/guests/([0-9]+)/?$ index.php?m=account_events&p=guests&id=$1 [L]
RewriteRule ^account/events/deleteguest/([0-9]+)/([0-9]+)/?$ index.php?m=account_events&p=deleteguest&id=$1&sid=$2 [L]
RewriteRule ^account/events/leave/([0-9]+)/([0-9]+)/?$ index.php?m=account_events&p=leave&id=$2&page=$1 [L]
RewriteRule ^account/events/comments/([0-9]+)/?$ index.php?m=account_events&p=comments&id=$1 [L]
RewriteRule ^account/events/comments/([0-9]+)/([0-9]+)/?$ index.php?m=account_events&p=comments&id=$1&page=$2 [L]
RewriteRule ^account/events/comments/delete/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_events&p=deletecomment&id=$1&cid=$2&page=$3 [L]

## events pictures
RewriteRule ^account/events/pictures/([0-9]+)/?$ index.php?m=account_events_pictures&eid=$1 [L]
RewriteRule ^account/events/pictures/([0-9]+)/([0-9]+)/?$ index.php?m=account_events_pictures&eid=$1&page=$2 [L]
RewriteRule ^account/events/pictures/add/([0-9]+)/?$ index.php?m=account_events_pictures&p=add&eid=$1 [L]
RewriteRule ^account/events/pictures/edit/([0-9]+)/([0-9]+)/?$ index.php?m=account_events_pictures&p=edit&eid=$1&id=$2 [L]
RewriteRule ^account/events/pictures/delete/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_events_pictures&p=delete&page=$1&eid=$2&id=$3 [L]
RewriteRule ^account/events/pictures/primary/([0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?m=account_events_pictures&p=primary&page=$1&eid=$2&id=$3 [L]


################################################################
##################### MEMBER PUBLIC PAGES #####################
################################################################

## profile
RewriteRule ^member/([0-9a-zA-Z_\-]+)/?$ index.php?m=member_profile&p=profile&id=$1 [L]


## picture albums
RewriteRule ^member/([0-9]+)/(albums|pictures)/?$ index.php?m=member_pictures&p=albums&id=$1 [L]
RewriteRule ^member/([0-9]+)/albums/([0-9]+)/?$ index.php?m=member_pictures&p=albums&id=$1&page=$2 [L]
RewriteRule ^member/([0-9]+)/pictures/([0-9]+)[a-zA-Z0-9\-]*/?$ index.php?m=member_pictures&p=pictures&id=$1&aid=$2 [L]
RewriteRule ^member/([0-9]+)/pictures/([0-9]+)[a-zA-Z0-9\-]*/([0-9]+)/?$ index.php?m=member_pictures&p=pictures&id=$1&aid=$2&page=$3 [L]
RewriteRule ^member/([0-9]+)/pictures/view/([0-9]+)/([0-9]+)[a-zA-Z0-9\-]*/?$ index.php?m=member_pictures&p=view&id=$1&aid=$2&sid=$3 [L]
RewriteRule ^member/([0-9]+)/pictures/view/([0-9]+)/([0-9]+)/back/?$ index.php?m=member_pictures&p=view&id=$1&aid=$2&sid=$3&d=back [L]
RewriteRule ^member/([0-9]+)/pictures/view/([0-9]+)/([0-9]+)/next/?$ index.php?m=member_pictures&p=view&id=$1&aid=$2&sid=$3&d=next [L]
RewriteRule ^member/([0-9]+)/pictures/view/([0-9]+)/([0-9]+)/first/?$ index.php?m=member_pictures&p=view&id=$1&aid=$2&sid=$3&d=first [L]
RewriteRule ^member/([0-9]+)/pictures/view/([0-9]+)/([0-9]+)/last/?$ index.php?m=member_pictures&p=view&id=$1&aid=$2&sid=$3&d=last [L]


## videos
RewriteRule ^member/([0-9]+)/videos/?$ index.php?m=member_videos&p=videos&id=$1 [L]
RewriteRule ^member/([0-9]+)/videos/([0-9]+)/?$ index.php?m=member_videos&p=videos&id=$1&page=$2 [L]
RewriteRule ^member/([0-9]+)/videos/view/([0-9]+)[a-zA-Z0-9\-]*/?$ index.php?m=member_videos&p=view&id=$1&sid=$2 [L]
RewriteRule ^member/([0-9]+)/videos/view/([0-9]+)/back/?$ index.php?m=member_videos&p=view&id=$1&sid=$2&d=back [L]
RewriteRule ^member/([0-9]+)/videos/view/([0-9]+)/next/?$ index.php?m=member_videos&p=view&id=$1&sid=$2&d=next [L]
RewriteRule ^member/([0-9]+)/videos/view/([0-9]+)/first/?$ index.php?m=member_videos&p=view&id=$1&sid=$2&d=first [L]
RewriteRule ^member/([0-9]+)/videos/view/([0-9]+)/last/?$ index.php?m=member_videos&p=view&id=$1&sid=$2&d=last [L]


## audio
RewriteRule ^member/([0-9]+)/audio/?$ index.php?m=member_audio&p=audio&id=$1 [L]
RewriteRule ^member/([0-9]+)/audio/([0-9]+)/?$ index.php?m=member_audio&p=audio&id=$1&offset=$2 [L]
RewriteRule ^member/([0-9]+)/audio/([0-9]+)/([0-9]+)/?$ index.php?m=member_audio&p=audio&id=$1&sid=$3&offset=$2 [L]
RewriteRule ^member/([0-9]+)/audio/xml/?$ index.php?m=member_audio&p=xml&id=$1 [L]


## guestbooks
RewriteRule ^member/([0-9]+)/guestbook/?$ index.php?m=member_guestbook&p=guestbook&id=$1 [L]
RewriteRule ^member/([0-9]+)/guestbook/([0-9]+)/?$ index.php?m=member_guestbook&p=guestbook&id=$1&page=$2 [L]
RewriteRule ^member/([0-9]+)/guestbook/([0-9]+)/([0-9]+)/?$ index.php?m=member_guestbook&p=guestbook&id=$1&page=$2&sid=$3 [L]
RewriteRule ^member/([0-9]+)/guestbook/rss/?$ index.php?m=member_guestbook&p=rss&id=$1 [L]


## gifts
RewriteRule ^member/([0-9]+)/gifts/?$ index.php?m=member_gifts&p=gifts&id=$1 [L]


## blogs
RewriteRule ^member/([0-9]+)/blog/?$ index.php?m=member_blog&p=blog&id=$1 [L]
RewriteRule ^member/([0-9]+)/blog/([0-9]+)/?$ index.php?m=member_blog&p=blog&id=$1&page=$2 [L]
RewriteRule ^member/([0-9]+)/blog/view/([0-9]+)[a-zA-Z0-9\-]*/?$ index.php?m=member_blog&p=view&id=$1&sid=$2 [L]
RewriteRule ^member/([0-9]+)/blog/rss/?$ index.php?m=member_blog&p=rss&id=$1 [L]


## friends
RewriteRule ^member/([0-9]+)/friends/?$ index.php?m=member_friends&p=friends&id=$1 [L]
RewriteRule ^member/([0-9]+)/friends/([0-9]+)/?$ index.php?m=member_friends&p=friends&id=$1&page=$2 [L]


## events
RewriteRule ^member/([0-9]+)/events/?$ index.php?m=member_events&p=events&id=$1 [L]


###########################################################
##################### SITE WIDE PAGES #####################
###########################################################


## news
RewriteRule ^news/?$ index.php?m=news [L]
RewriteRule ^news/([0-9]+)/?$ index.php?m=news&page=$1 [L]
RewriteRule ^news/view/([0-9]+)[a-zA-Z0-9\-]*/?$ index.php?m=news&p=view&id=$1 [L]
RewriteRule ^news/rss/?$ index.php?m=news&p=rss [L]


## events
RewriteRule ^events/?$ index.php?m=events [L]
RewriteRule ^events/([0-9]+)/?$ index.php?m=events&date=$1 [L]
RewriteRule ^events/details/([0-9]+)[a-zA-Z0-9\-]*/?$ index.php?m=events&p=details&id=$1 [L]
RewriteRule ^events/guests/([0-9]+)/?$ index.php?m=events&p=guests&id=$1 [L]
RewriteRule ^events/join/([0-9]+)/?$ index.php?m=events&p=join&id=$1 [L]
RewriteRule ^events/calendar/?$ index.php?m=events&p=calendar [L]
RewriteRule ^events/calendar/([0-9]{6})/?$ index.php?m=events&p=calendar&date=$1 [L]
RewriteRule ^events/rss/?$ index.php?m=events&p=rss [L]
RewriteRule ^events/search/?$ index.php?m=events&p=search [L]
RewriteRule ^events/search/([0-9a-zA-Z]+)/?$ index.php?m=events&p=search&s=$1 [L]
RewriteRule ^events/search/([0-9a-zA-Z]+)/([0-9]+)/?$ index.php?m=events&p=search&s=$1&page=$2 [L]
RewriteRule ^events/search/([0-9a-zA-Z]+)/([a-zA-Z]+)/([a-zA-Z]+)/?$ index.php?m=events&p=search&s=$1&orderby=$2&direction=$3 [L]


## event pictures

RewriteRule ^events/pictures/([0-9]+)/?$ index.php?m=events_pictures&p=pictures&eid=$1 [L]
RewriteRule ^events/pictures/([0-9]+)/([0-9]+)/?$ index.php?m=events_pictures&p=pictures&eid=$1&page=$2 [L]
RewriteRule ^events/pictures/view/([0-9]+)/([0-9]+)/?$ index.php?m=events_pictures&p=view&eid=$1&sid=$2 [L]
RewriteRule ^events/pictures/view/([0-9]+)/([0-9]+)/back/?$ index.php?m=events_pictures&p=view&eid=$1&sid=$2&d=back [L]
RewriteRule ^events/pictures/view/([0-9]+)/([0-9]+)/next/?$ index.php?m=events_pictures&p=view&eid=$1&sid=$2&d=next [L]
RewriteRule ^events/pictures/view/([0-9]+)/([0-9]+)/first/?$ index.php?m=events_pictures&p=view&eid=$1&sid=$2&d=first [L]
RewriteRule ^events/pictures/view/([0-9]+)/([0-9]+)/last/?$ index.php?m=events_pictures&p=view&eid=$1&sid=$2&d=last [L]


## contact us, tell a friend
RewriteRule ^(contactus|invitefriends)/?$ index.php?m=$1 [L]


## custom pages
RewriteRule ^page/([0-9A-Za-z_\-]+)/?$ index.php?m=pages&p=$1 [L]
RewriteRule ^page/([0-9A-Za-z_\-]+)/([0-9A-Za-z_\-]+)/?$ index.php?m=pages&g=$1&p=$2 [L]


## search
RewriteRule ^search/?$ index.php?m=search [L]
RewriteRule ^search/(advanced|saved|matchmaker)/?$ index.php?m=search&p=$1 [L]
RewriteRule ^search/(saved|delete)/([0-9]+)/?$ index.php?m=search&p=$1&qid=$2 [L]
RewriteRule ^search/rss/([0-9]+)/([0-9a-zA-Z]+)/?$ index.php?m=search&p=rss&qid=$1&s=$2 [L]
RewriteRule ^search/([0-9a-zA-Z]+)/?$ index.php?m=search&s=$1 [L]
RewriteRule ^search/([0-9a-zA-Z]+)/([0-9]+)/?$ index.php?m=search&s=$1&page=$2 [L]
RewriteRule ^search/([0-9a-zA-Z]+)/([a-zA-Z]+)/([a-zA-Z]+)/?$ index.php?m=search&s=$1&orderby=$2&direction=$3 [L]

## blogs
RewriteRule ^blogs/?$ index.php?m=blogs [L]
RewriteRule ^blogs/([0-9]+)/?$ index.php?m=blogs&page=$1 [L]
RewriteRule ^blogs/([0-9]+)/(postdate|totalcomments|totalviews)/(asc|desc)/?$ index.php?m=blogs&page=$1&orderby=$2&direction=$3 [L]
RewriteRule ^blogs/([0-9]+)/(postdate|totalcomments|totalviews)/(asc|desc)/([a-zA-Z0-9\-]+)/?$ index.php?m=blogs&page=$1&orderby=$2&direction=$3&s=$4 [L]

## videos
RewriteRule ^videos/?$ index.php?m=videos [L]
RewriteRule ^videos/([0-9]+)/?$ index.php?m=videos&page=$1 [L]
RewriteRule ^videos/([0-9]+)/(dateadded|averagerating|totalviews)/(asc|desc)/?$ index.php?m=videos&page=$1&orderby=$2&direction=$3 [L]
RewriteRule ^videos/([0-9]+)/(dateadded|averagerating|totalviews)/(asc|desc)/([a-zA-Z0-9\-]+)/?$ index.php?m=videos&page=$1&orderby=$2&direction=$3&s=$4 [L]

## pictures
RewriteRule ^pictures/?$ index.php?m=pictures [L]
RewriteRule ^pictures/([0-9]+)/?$ index.php?m=pictures&page=$1 [L]
RewriteRule ^pictures/([0-9]+)/(dateadded|averagerating|totalviews)/(asc|desc)/?$ index.php?m=pictures&page=$1&orderby=$2&direction=$3 [L]
RewriteRule ^pictures/([0-9]+)/(dateadded|averagerating|totalviews)/(asc|desc)/([a-zA-Z0-9\-]+)/?$ index.php?m=pictures&page=$1&orderby=$2&direction=$3&s=$4 [L]


## referrals
RewriteRule ^ref/([0-9]+)/?$ index.php?ref=$1 [L]


## rate pictures
RewriteRule ^hotornot/?$ index.php?m=hotornot [L]
RewriteRule ^hotornot/([0-9a-zA-Z]+)/?$ index.php?m=hotornot&s=$1 [L]


## members public page
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9a-zA-Z_\-]+)/?$ index.php?m=member_profile&p=profile&id=$1 [L]


</IfModule>

mfg
Alex

05.10.2010 10:18

8 Jörg

Sorry, da hatte ich gepennt - der alte Query String wird automatisch wieder drangehängt - die unteren Rules haben damit nichts zu tun.

Du kannst den alten Query String mit einem "?" an der Ziel-URL abhängen

RewriteCond %{QUERY_STRING} s=index&tmpl=de&showid=
RewriteRule ^profil/$ http://www.meinedomain.de/? [R=301,L]

05.10.2010 13:12

9 alex

Hallo,

vielen Dank, jetzt klappt es.

mfg
Alex

05.10.2010 15:24

Beitrag schreiben (als Gast)





[BBCode-Hilfe]