dpvhv66448 2015-09-08 15:48
浏览 35

.htaccess mod重写导致远程服务器上的表单操作URL的奇怪错误

I am not sure if the problem is the .htaccess file but it is what my hosting company are telling me.

I have used a framework called Perch for a site I am building which I have tweaked to work how I want it to for a shopping cart area on the site. The site works fine on my local server (MAMP) but since I have uploaded to my remote server I am having a problem adding an item to the cart (using a straight forward form post action whilst testing and getting it to work).

My .htaccess file includes all of the following:

Options +FollowSymlinks
RewriteEngine On

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)/?$ $1.php [L,QSA]

RewriteRule ^dog-agility-equipment/([a-zA-Z0-9-/]+)$ /dog-agility-equipment/category.php?cat=$1 [L]
RewriteRule ^agility-equipment/([a-zA-Z0-9-/]+)/([a-zA-Z0-9-/]+)$ /dog-agility-equipment/product.php?s=$2 [L]
RewriteRule ^agility-equipment/([a-zA-Z0-9-/]+)$ /dog-agility-equipment/product.php?s=$1 [L]

The form action [url] is

/manage/addons/apps/perch_shop_paypal/cart.functions.php

And the server is trying to direct to the url

http://site-name.uk/manage/?r=%2Fmanage%2Faddons%2Fapps%2Fperch_shop_paypal%2Fcart.functions.php

I have never seen this before and can't see why my .htaccess file would be causing this issue (especially as it doesn't happen on my local server).

Does anyone know why this is happening, what am I missing?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
    • ¥15 关于#Java#的问题,如何解决?
    • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line