Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/285.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
Php .htaccess处于开发模式/友好url_Php_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Php .htaccess处于开发模式/友好url

Php .htaccess处于开发模式/友好url,php,apache,.htaccess,mod-rewrite,Php,Apache,.htaccess,Mod Rewrite,我正在使用开发url,在这个文件夹中我有一个主项目 -我想访问en/1 其中重写参数为index.php?lang=en&item=1等 我正在使用.htaccess # enable rewrite engine RewriteEngine On Options -Indexes RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?page=$1 [L,QSA] 此外,web2.domain.com中也使用了.ht

我正在使用开发url,在这个文件夹中我有一个主项目 -我想访问en/1 其中重写参数为index.php?lang=en&item=1等

我正在使用.htaccess

# enable rewrite engine
RewriteEngine On
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?page=$1 [L,QSA]
此外,web2.domain.com中也使用了.htaccess,因此也需要在其中工作

在当前配置中,系统不工作(无限循环),也在真实环境中使用web2.domain.com/en。web未正确显示

我需要帮助解决这个问题或一些有用的指针。感谢您提供的高级功能

请尝试:

RewriteRule ^demo/version2/([a-z]*)/([0-9]*)$ index.php?lang=$1&item=$2 [L,QSA]
尝试:


在这种情况下,我认为重写规则不起任何作用---服务器响应:未找到此服务器上未找到请求的URL/demo/version2/en/1。在这种情况下,我认为重写规则不起任何作用---服务器响应:未找到此服务器上未找到请求的URL/demo/version2/en/1。