skip to Main Content

I have the following URL:

https://www.mydomain.de/termin_cancel=c502b486-e8ad-490a-a615-80307a515fc8

Original url:

https://www.mydomain.de/index.php?termin_cancel=c502b486-e8ad-490a-a615-80307a515fc8

rewrite rule:

RewriteRule ^termin_cancel=([w-]+)/?$ index.php?termin_cancel=$1 [L,NC,QSA]

This works !

But now I have a problem with the next situation:

The url should be:

https://www.mydomain.de/termin_change=XXX&serviceID=XXX&firstname=XXX&lastname=XXX&email=XXX

original url:

https://www.mydomain.de/index.php?termin_change=XXX&serviceID=XXX&firstname=XXX&lastname=XXX&email=XXX

I don’t know which htaccess rule work fo this.
It should be possible to access the parameters via php $_GET.

3

Answers


  1. Could you please try following.

    RewriteEngine ON
    RewriteRule ^(.*) index.php?$1 [QSA,NE,L]
    

    OR with / in case your index.php is present in root directory/folder.

    RewriteEngine ON
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule ^(.*) /index.php?$1 [QSA,NE,L]
    

    OR(either put above or put following)

    RewriteEngine ON
    RewriteCond %{QUERY_STRING} ^$
    RewriteCond %{REQUEST_URI} ^/termin_change=.*/?$ [NC]
    RewriteRule ^(.*) /index.php?$1 [QSA,NE,L]
    
    Login or Signup to reply.
  2. Try, something like below specifically for termin_change=

    RewriteRule ^termin_change=(.+)/?$ index.php?termin_change=$1 [L,NC,QSA]
    
    Login or Signup to reply.
  3. This should work for you.

    RewriteRule ^termin_change=([^&]+)&serviceID=([^&]+)&firstname=([^&]+)&lastname=([^&]+)&email=([^&]+)$ /index.php?termin_change=$1&serviceID=$2&firstname=$3&lastname=$4&email=$5 [L,NC]
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search