简体   繁体   English

使用Htaccess的Paypal Mod_Rewrite

[英]Paypal with Htaccess Mod_Rewrite

I've got a problem with Paypal and Htaccess, I can't figure it out how can I integrate the Paypal query string with my mod_rewrite directive. 我在使用Paypal和Htaccess时遇到问题,我无法弄清楚如何将Paypal查询字符串与我的mod_rewrite指令集成在一起。 I have already tried to use the suggestion of this answer but it doesn't suits to me. 我已经尝试使用此答案的建议,但它不适合我。

I've got this directive that take cares of all the request (views) 我有这个指令,可以处理所有请求(视图)

# Routes
RewriteRule ^private/([^/]*)$ /private.php?view=$1 [L]

So if the URL is http://www.site.com/private/foo of course the real URL is private.php?view=foo this works like a charm. 因此,如果该URL是http://www.site.com/private/foo ,则实际的URL当然是private.php?view = foo,这就像一个超级按钮。

The problem is that I want to use the same directive for paypal, I mean I want to create something like this 问题是我想对贝宝使用相同的指令,我的意思是我想创建类似这样的东西

http://www.site.com/private/payments?tx=1234&st=Completed&amt=5.00&cc=USD&cm=&item_number=

Where /private/payments is private.php?view=payments so, as you can see, I got two ? / private / payments是private.php?view = payments的地方,如您所见,我有两个 and this is not good because all the paypal's parameters will be ignored. 这样做不好,因为所有贝宝的参数都会被忽略。 How can I edit the htaccess to gain all the params ? 我如何编辑htaccess以获得所有参数? I can't find a solution :/ 我找不到解决方法:/

Thanks for any answers. 感谢您的回答。

我对mod rewrite并不满意,但是您可以创建一个不在常规文件夹结构之外的代理脚本,并使用PHP来获取该变量并将其传递回您的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM