开发者

.htaccess redirect / rewrite

开发者 https://www.devze.com 2022-12-27 02:09 出处:网络
I am trying to redirect from: domain.com/uploads/$ to domain.com/download.php?file=$ $ being the variable.

I am trying to redirect from:

domain.com/uploads/$

to

domain.com/download.php?file=$

$ being the variable.

I have tried many different ways but 开发者_StackOverflow社区do not seem to be redirecting, I've tried, R=301,L,QSA and in various different orders.

Anyone help? Thanks!


What about something like this :

RewriteEngine On
RewriteRule ^uploads/(.*) /download.php?file=$1 [R=301]
0

精彩评论

暂无评论...
验证码 换一张
取 消