开发者

Passing values to htaccess

i have a htaccess file for redirection

the redirected content is

RewriteCond %{REQUEST_FILENAME} -location&action=photos&page=$
RewriteRule ^(.*)$ /sitename/view.php?link=$1&action=photos&page=&1
 [L,QSA]

The page numer is dynamically passing from the page How we can get the page number he开发者_开发知识库re pls helpme


To answer your headline: You cannot pass values to a .htaccess file.

You can however generate the .htaccess file by a script, if that helps you.

Regarding your sample code, maybe this is what you like to achieve:

RewriteCond %{REQUEST_FILENAME} -location&action=photos&page=$
RewriteRule ^(.*)&page=(.*)$ /sitename/view.php?link=$1&action=photos&page=$2
 [L,QSA]

Using this you can access the link via $1 and the page via $2

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜