2010-05-17 31 views
0

我試圖重寫從 mysite.com/pokerbono/xyz 到 mysite.com/pokerbono.php?id=XYZ 這是我在.htaccess中添加代碼:的Joomla的.htaccess問題

####的聯盟鏈接

重寫規則^ pokerbono /(A-ZA-Z0-9 _-] +)$ pokerbono.php?ID = $ 1 [L]

有什麼不對本規則?我試着像100度的變化和總是收到一個404

我想每一個變化,現在我在我的.htaccess以下行:

重寫規則^ pokerbono /(A-ZA-Z0 9 _-] +)$ pokerbono.php?id = $ 1 [L]

RewriteRule^pokerbono /([a-zA-Z0-9 _-] +)/ $ pokerbono.php?id = $ 1 [L]

重寫規則^/pokerbono /([A-ZA-Z0-9 _-] +)$ pokerbono.php?編號= $ 1 [L]

RewriteRule ^/pokerbono /([a-zA-Z0-9_-] +)/ $ pokerbono.php?id = $ 1 [L]

RewriteRule ^/pokerbono /([a-zA-Z0-9_- ] +)$ /pokerbono.php?id=$1 [L]

RewriteRule ^/pokerbono /([a-zA-Z0-9 _-] +)/ $ /pokerbono.php?id=$1 [L]

回答

0

嘗試包括前斜線:

RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)$ /pokerbono.php?id=$1 [L] 

UPD

這工作在我的環境:

RewriteEngine On 
RewriteRule ^qwe/([-_a-zA-Z0-9]*)$ qwe.php?id=$1 [L] 
+0

我想每一個變化,現在我在這.htacces: RewriteRule^pokerbono /([a-zA-Z0-9 _-] +)$ pokerbono.php?id = $ 1 [L] RewriteRule^pokerbono /([a-zA-Z0-9 _-] +)/ $ pokerbono。 php?id = $ 1 [L] RewriteRule ^/pokerbono /([a-zA-Z0-9 _-] +)$ pokerbono.php?id = $ 1 [L] RewriteRule ^/pokerbono /([a- Z0-9 _-] +)/ $ pokerbono.php?id = $ 1 [L] RewriteRule ^/pokerbono /([a-zA-Z0-9 _-] +)$/poker bono.php?id = $ 1 [L] RewriteRule ^/pokerbono /([a-zA-Z0-9 _-] +)/ $ /pokerbono.php?id=$1 [L] – Tobias 2010-05-17 23:29:29

+0

@Tobias:更新了我的答案。 – newtover 2010-05-17 23:58:38

0

我不得不關閉在Multiviews,現在它工作正常:)