htaccess是否将php重写为html,无post方法?
我使用这个htaccess将php扩展重写为.html。 我有一个有效的表单,它应该发布到一个url,但我无法获取发布数据,我认为这与htaccess有关htaccess是否将php重写为html,无post方法?,php,html,forms,.htaccess,http-post,Php,Html,Forms,.htaccess,Http Post,我使用这个htaccess将php扩展重写为.html。 我有一个有效的表单,它应该发布到一个url,但我无法获取发布数据,我认为这与htaccess有关 Options +FollowSymlinks Options -Indexes RewriteEngine On RewriteBase /mypath/ # Rewrite to SEF URL's RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}
Options +FollowSymlinks
Options -Indexes
RewriteEngine On
RewriteBase /mypath/
# Rewrite to SEF URL's
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)/(.*)/(.*)\.html index.php?a=$1&b=$2&c=$3&d=$4 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)/(.*)\.html index.php?a=$1&b=$2&c=$3 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)\.html index.php?a=$1&b=$2 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html index.php?a=$1 [QSA,L]
有人能解决我的问题吗?我想,你必须使用一个非贪婪的正则表达式。将
*
替换为*?
RewriteRule ^(.*?)/(.*?)/(.*?)/(.*?)\.html index.php?a=$1&b=$2&c=$3&d=$4 [QSA,L]
我想,你必须使用一个非贪婪的正则表达式。将
*
替换为*?
RewriteRule ^(.*?)/(.*?)/(.*?)/(.*?)\.html index.php?a=$1&b=$2&c=$3&d=$4 [QSA,L]
其他的也要适当。谢谢!成功了!感觉有点傻,我自己找不到。我没必要感到难过。我花了很多很多年的时间去学习,我现在所知道的。我还在学习。这就是我在这里回答问题的原因。:-)谢谢成功了!感觉有点傻,我自己找不到。我没必要感到难过。我花了很多很多年的时间去学习,我现在所知道的。我还在学习。这就是我在这里回答问题的原因。:-)