没有htaccess的短链接怎么样?

时间:2015-03-16 12:36:24

标签: php .htaccess

嘿,我的朋友,我是htaccess的菜鸟,我需要你的帮助:)。

这是我的htaccess文件:

Options +FollowSymLinks
RewriteEngine on
RewriteRule pro/(.*)/(.*)$ index.php?site=$1&cat=$2
RewriteRule go/(.*)/(.*)$ index.php?site=$1&cat=$2
RewriteRule goto/(.*)/(.*)$ index.php?site=$1&cat=$2
RewriteRule buying/(.*)/(.*)$ index.php?site=$1&cat=$2
RewriteRule pay index.php?site=pay
RewriteRule delivery index.php?site=delivery
RewriteRule faq index.php?site=faq
RewriteRule contact index.php?site=contact
RewriteRule replace index.php?site=replace

我目前的产品链接是:

http://localhost/pro/id/keys
http://localhost/pro/id/voucher
http://localhost/pro/id/tools

是否可以将我的链接发送到?:

http://localhost/keys.exe
http://localhost/voucher.exe
http://localhost/tools.exe
Or without .exe at the end ?

为了我糟糕的事情,我希望:我希望你们中的任何人都可以帮我解决我的问题:(

用户说我: 取代这条规则:

RewriteRule pro/(.*)/(.*)$ index.php?site=$1&cat=$2

with

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/.]+)\.exe$ /index.php?site=id&cat=$1 [L,QSA]

但它不起作用

0 个答案:

没有答案