Mod 重写和获取数据 - 适用于其中一个,但不适用于另一个
在这里遇到困难并感谢您的帮助。
创建具有双重选择注册的网站 - 在通过电子邮件发送的 URL 中使用 _GET 来完成订阅。 订阅后,我有一个链接,允许他们使用 _GET 访问过刊,
- 电子邮件中的链接如下所示: http://173.201.224.43/Jason_Borjeson/jeba2012/site/subscription_manager?act=1&h=a2df4b90c3fc3d061838661886e321d1
- 网页上的链接如下所示:http://173.201.224.43/Jason_Borjeson/jeba2012/site/past_issues?c =17&a=list
如果需要的话就是你可以使用链接 #1 访问链接 #2(表数据中表单按钮右侧的紫色文本链接),因为该网站仍在开发中。
站点上的所有页面都通过 mod_rewrite 运行。上面的 #1 有效,而 #2 产生 404(服务器声明 - 不是 php/数据库生成)。
/ 和 ? 之间的文本用于从数据库中选择页面,而 ? 后面的变量用于显示附加信息。
htaccess 文件如下:
RewriteEngine On
RewriteBase /Jason_Borjeson/jeba2012/site/
RewriteRule ^index\.php$ - [L]
RewriteRule ^css/css\.css$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
链接 #1 按预期完成了该过程,但链接 #2 似乎漏掉了裂缝。如果我 QSA 规则,我会在两者上收到内部服务器错误。
我只想传递所有信息并在我的 php 代码中解析它。
正如仅供参考 - _POST 似乎毫不费力地工作。也在 GoDaddy 上托管(如果这有影响的话)
再次感谢!
Stumped here and appreciate the help.
creating a site with double optin registration - uses _GET in an emailed URL to finish subscription.
After subscribing I have a link that allows them to access back issues using _GET
- the link in the email looks like:
http://173.201.224.43/Jason_Borjeson/jeba2012/site/subscription_manager?act=1&h=a2df4b90c3fc3d061838661886e321d1 - and the link on the web page looks like: http://173.201.224.43/Jason_Borjeson/jeba2012/site/past_issues?c=17&a=list
if need be you can use link #1 to get to link #2 (purple text link to the right of the form button in the table data) as the site is still under development.
all pages on the site run through mod_rewrite. #1 above works while #2 yields a 404 (server stated - not php/database generated).
the text between / and ? is used to select the page from the database while the variables after the ? are for additional info to be shown.
the htaccess file is as follows:
RewriteEngine On
RewriteBase /Jason_Borjeson/jeba2012/site/
RewriteRule ^index\.php$ - [L]
RewriteRule ^css/css\.css$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
link #1 makes it through the process as expected, but link #2 seems to slip through the crack. If I QSA the rule I get an internal server error on both.
I just want all info to be passed and am parsing it in my php code.
Just as an FYI - _POST seems to be working no sweat. Also hosting on GoDaddy (if that makes a difference)
Thanks again!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
即使第二个 URL 中最细微的变化也会导致重写启动。我必须相信重写条件没有得到满足 - 您的系统上可能有一个名为“past_issues”的目录。
Even the slightest change in the second URL makes the rewrite kick in. I have to believe the rewrite conditions are not being met -- that there is perhaps a directory named "past_issues" on your system.