我有一个推荐朋友模块,让人们长的推荐网址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