我有一個推薦朋友模塊,讓人們長的推薦網址Magento的Apache的現代重寫URL
我想縮短它使人們更容易輸入,但是能弄清楚如何得到它完成的.htaccess
下面是我的.htaccess的重寫部分
我想重定向
/AP/*到/ awardpoints /索引/ goReferral /被推薦人/ ( **是用戶ID)
我想:
RewriteRule ^ap/([0-9]+)$ /awardpoints/index/goReferral/referrer/$1 [R]
,但它不工作
<IfModule mod_rewrite.c>
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
#RewriteBase /magento/
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
############################################
## always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]
</IfModule>
什麼是您的RewriteBase?你的域的根目錄或其他東西? – 2012-04-09 08:15:04