Belki de ben bir şey eksik ama bunu anlamaya görünüyor olamaz.
Ben bir RewriteRule var:
RewriteRule ^view/(\w+)$ view.php?mmdid=$1 [L]
Ben mydomain.org/view/3 gittiğinizde ve, $ _GET dizi boştur. 'Mmdid' hiçbir anahtar yoktur.
Ancak, ben gibi başka bir şey, benim kuralı değiştirmek:
RewriteRule ^viewz/(\w+)$ view.php?mmdid=$1 [L]
Ben mydomain.org/viewz/3 ziyaret ettiğinizde gayet iyi çalışıyor. $ _GET Yazdırırken ben Array ([mmdid] => 1) olsun.
Orada çelişebilir buna benzer başka hiçbir kural vardır, ve ben apache yeniden başlattım ettik.
Bu durumda neden herhangi bir fikir? 'Görünümü', bir anahtar kelime ya da bir şey mi?
İşte Rewrite günlüğüne içeriği olan:
192.168.204.187 - - [15/Jun/2009:13:01:19 --0400] [mydomain.org/sid#2787ab8][rid#2a61030/subreq] (1) [perdir /path/to/webroot/] pass through /path/to/webroot/view.php
192.168.204.187 - - [15/Jun/2009:13:01:19 --0400] [mydomain.org/sid#2787ab8][rid#2a54000/initial] (3) [perdir /path/to/webroot/] add path info postfix: /path/to/webroot/view.php -> /path/to/webroot/view.php/1
192.168.204.187 - - [15/Jun/2009:13:01:19 --0400] [mydomain.org/sid#2787ab8][rid#2a54000/initial] (3) [perdir /path/to/webroot/] strip per-dir prefix: /path/to/webroot/view.php/1 -> view.php/1
192.168.204.187 - - [15/Jun/2009:13:01:19 --0400] [mydomain.org/sid#2787ab8][rid#2a54000/initial] (3) [perdir /path/to/webroot/] applying pattern '^(.*)$' to uri 'view.php/1'
192.168.204.187 - - [15/Jun/2009:13:01:19 --0400] [mydomain.org/sid#2787ab8][rid#2a54000/initial] (4) [perdir /path/to/webroot/] RewriteCond: input='mydomain.org' pattern='^www\.mydomain\.org$' => not-matched
192.168.204.187 - - [15/Jun/2009:13:01:19 --0400] [mydomain.org/sid#2787ab8][rid#2a54000/initial] (1) [perdir /path/to/webroot/] pass through /path/to/webroot/view.php
192.168.204.187 - - [15/Jun/2009:13:01:19 --0400] [mydomain.org/sid#2787ab8][rid#2930e58/subreq] (1) [perdir /path/to/webroot/] pass through /path/to/webroot/1
Sadece ^ v / (\ w +) $ kullanırken İşte günlüğüne çıktı ....
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (3) [perdir /path/to/webroot/] add path info postfix: /path/to/webroot/v -> /path/to/webroot/v/1
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (3) [perdir /path/to/webroot/] strip per-dir prefix: /path/to/webroot/v/1 -> v/1
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (3) [perdir /path/to/webroot/] applying pattern '^v/([0-9]+)$' to uri 'v/1'
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (2) [perdir /path/to/webroot/] rewrite 'v/1' -> 'view.php?mmdid=1'
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (3) split uri=view.php?mmdid=1 -> uri=view.php, args=mmdid=1
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (3) [perdir /path/to/webroot/] add per-dir prefix: view.php -> /path/to/webroot/view.php
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (2) [perdir /path/to/webroot/] strip document_root prefix: /path/to/webroot/view.php -> /view.php
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a63038/initial] (1) [perdir /path/to/webroot/] internal redirect with /view.php [INTERNAL REDIRECT]
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a5ebc0/initial/redir#1] (3) [perdir /path/to/webroot/] strip per-dir prefix: /path/to/webroot/view.php -> view.php
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a5ebc0/initial/redir#1] (3) [perdir /path/to/webroot/] applying pattern '^v/([0-9]+)$' to uri 'view.php'
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a5ebc0/initial/redir#1] (3) [perdir /path/to/webroot/] strip per-dir prefix: /path/to/webroot/view.php -> view.php
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a5ebc0/initial/redir#1] (3) [perdir /path/to/webroot/] applying pattern '^(.*)$' to uri 'view.php'
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a5ebc0/initial/redir#1] (4) [perdir /path/to/webroot/] RewriteCond: input='mydomain.org' pattern='^www\.mydomain\.org$' => not-matched
192.168.204.187 - - [15/Jun/2009:13:10:09 --0400] [mydomain.org/sid#2787ab8][rid#2a5ebc0/initial/redir#1] (1) [perdir /path/to/webroot/] pass through /path/to/webroot/view.php
Teşekkür ederim,