我有以下htaccess代码
tell application "Finder"
set myPath to container of (path to me) as text -- SET MAIN PATH
set Keywords to read file (myPath & "KEYWORDS.txt") as «class utf8» using delimiter linefeed
end tell
set site_url to "https://teespring.com/search?q="
tell application "Safari"
repeat with Keyword in Keywords
make new document
set URL of front document to site_url & Keyword
delay 10
set theLinks to {}
tell application "Safari" to set num_links to (do JavaScript "document.links.length" in document 1)
set linkCounter to num_links - 1
-- retrieve the links
repeat with i from 0 to linkCounter
tell application "Safari" to set end of theLinks to do JavaScript "document.links[" & i & "].href" in document 1
end repeat
repeat until ((do JavaScript "document.readyState" in front document) is "complete")
delay 10
end repeat
close front document
end repeat
拥有此网址
http://localhost/dashboard-detailed-view-absence?dept=ABS&test=23
当我尝试在GET变量中获取参数时,只有页面值即将到来。 其他参数dept&测试参数无法获取
来自php的结果(print_r($ _ GET))
RewriteCond %{REQUEST_URI} ^/dashboard-detailed-view-(.*)$
RewriteRule ^dashboard-detailed-view-(.*)$ /rat/view/dashboard-detailed-view.php?page=$1 [L]
我希望获得GET中的所有三个(页面,部门,测试)参数
答案 0 :(得分:1)
要结合新旧查询字符串,您需要使用QSA标志
RewriteCond %{REQUEST_URI} ^/dashboard-detailed-view-(.*)$
RewriteRule ^dashboard-detailed-view-(.*)$ /rat/view/dashboard-detailed-view.php?page=$1 [L,QSA]