将值传递给 htaccess
我有一个用于重定向的 htaccess 文件,
重定向的内容是
RewriteCond %{REQUEST_FILENAME} -location&action=photos&page=$
RewriteRule ^(.*)$ /sitename/view.php?link=$1&action=photos&page=&1
[L,QSA]
页面编号是从页面动态传递的 我们如何在这里获取页码请帮助我
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 here pls helpme
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答您的标题:您无法将值传递给 .htaccess 文件。
不过,如果对您有帮助,您可以通过脚本生成 .htaccess 文件。
关于您的示例代码,也许这就是您想要实现的目标:
使用它您可以通过 $1 访问链接,通过 $2 访问页面
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:
Using this you can access the link via $1 and the page via $2