开发者

htaccess rewrite is using only 2 files php

How htaccess syntax?

I have 3 files (php) a. premium.php

b. direktori2.php

c. direktori_det2.php

this Flow:

  1. example.com/AbelPutra-com (inside premium.php) and i direct to direktori2.php file

    ---> RewriteRule ^([A-Za-z0-9-()/&]+)/?$ direktori2.php?NamaToko=$1 [NC,L]

    this is OK

  2. example.com/AbelPutra-com/Modern-Karaoke (inside direktori2.php) and I direct to direktori_det2.php file

    ---> RewriteRule ^([A-Za-z0-9-()/&]+)/([A-Za-z0-9-()/&]+)/?$ direktori_det2.php?NamaToko=$1&NamaProduk=$1 [NC,L]

    *this is Problem *

    开发者_运维知识库

    or this error Syntax?

When I running in number 2, server read with rewrite in number 1 (always read number 1)

How to fix?


Without detailed looking into this rule I found this mistake:

RewriteRule ^([A-Za-z0-9-()/&]+)/([A-Za-z0-9-()/&]+)/?$ direktori_det2.php?NamaToko=$1&NamaProduk=$2

You use NamaProduk=$1 instead of NamaProduk=$2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜