Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache HTACCESS问题_Apache_.htaccess - Fatal编程技术网

Apache HTACCESS问题

Apache HTACCESS问题,apache,.htaccess,Apache,.htaccess,我无法在服务器或xampp上使用.htaccess url如下所示: http://mydomain.com/new/index.php?p=category&id=1&url=cards http://mydomain.com/new/index.php?p=product&ip=1&url=bussiness_card new是我现在工作的站点的新版本的文件夹 据我所知,重写应该是这样的: http://mydomain.com/new/category/c

我无法在服务器或xampp上使用.htaccess

url如下所示:

http://mydomain.com/new/index.php?p=category&id=1&url=cards
http://mydomain.com/new/index.php?p=product&ip=1&url=bussiness_card
new是我现在工作的站点的新版本的文件夹

据我所知,重写应该是这样的:

http://mydomain.com/new/category/cards
没有

这是我的.htaccess文件:

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
RewriteRule ^(new/admin)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/new/(.*) 
# For Friendly URLs
RewriteRule ^([^/]+)/([^/]+).html /new/index.php?p=$1 [L,QSA]
#RewriteRule ^([^/]+)/([^/]+).html /new/index.php?p=$1&url=$2 [L,NC]
我在XAMPP中也有同样的问题,url重写的设置在http.conf中被激活,但它不起作用。有谁能给我解释一下,或者一步一步地给我一个非常明确的教程,说明为什么它不起作用吗?

RewriteBase/new/你已经试过了吗?您是否收到500个内部服务器错误,或者在尝试访问URL时收到404个错误?

您希望用户看到吗http://mydomain.com/new/category/cards 在url中还是以其他方式?