Jump to content

Rewrite Rule Issue


benaust

Recommended Posts

I have something like below, first one is to open the variables in Template Page "TPL1" and the next to open the variables in "TPL2" page.

 

When I add the second one the whole thing fails and do not work

 

RewriteRule TPL1/Var1/(.*)/Var2/(.*)/Var3/(.*)/Var4/(.*)/Var5/(.*)/

TPL1.php?Var1=$1&Var2=$2&Var3=$3&Var4=$4&Var5=$5

 

RewriteRule TPL2/Var1/(.*)/Var2/(.*)/Var3/(.*)/Var4/(.*)/Var5/(.*)/

TPL2.php?Var1=$1&Var2=$2&Var3=$3&Var4=$4&Var5=$5

 

Could someone point out if this is possible and or where my mistake is,

 

Thanks

 

  • 2 weeks later...

Oh, no problem, thanks for trying anyway. Appreciated.

 

If there is anyone out there I still am stuck. I have read a lot about the rewrite rules, but I really have to change a lot to adapt to them. So first like to see if I can resolve it short way.

 

O.K let me see if I can explain little bit better. If you look at the below two rewrite rules you can see the only difference is the main page or template page "TPL1 & TPL2" they both have same amount and same variables in each rewrite rule. If I do put both of these in the htaccess none of them will work, if the first rule is there only in htaccess it is fine.

 

RewriteRule TPL1/Var1/(.*)/Var2/(.*)/Var3/(.*)/Var4/(.*)/Var5/(.*)/

TPL1.php?Var1=$1&Var2=$2&Var3=$3&Var4=$4&Var5=$5

 

RewriteRule TPL2/Var1/(.*)/Var2/(.*)/Var3/(.*)/Var4/(.*)/Var5/(.*)/

TPL2.php?Var1=$1&Var2=$2&Var3=$3&Var4=$4&Var5=$5

 

Below is what I have in htaccess which they do work, but not when using same condition for two different template pages. It uses same TPL1 page as template, but there are different amount of variables in each.

 

Options +FollowSymLinks

RewriteEngine on

 

#Rule 1

RewriteRule TPL1/Page/(.*)/Place/(.*)/PageTitle/(.*)/PrintThis/(.*)/ TPL1.php?Page=$1&Place=$2&PageTitle=$3&PrintThis=$4

 

#Rule 2

RewriteRule index/Page/(.*)/Place/(.*)/PageTitle/(.*)/PrintThis/(.*)/domain/(.*)/ TPL1.php?Page=$1&Place=$2&PageTitle=$3&PrintThis=$4&domain=$5

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.