Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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_Url Rewriting - Fatal编程技术网

Php htaccess URL重写文件是否视为文件夹?

Php htaccess URL重写文件是否视为文件夹?,php,apache,.htaccess,mod-rewrite,url-rewriting,Php,Apache,.htaccess,Mod Rewrite,Url Rewriting,有没有可能用pagehttp://welcome.com/about.php插入类似此URL的内容http://welcome.com/about/ 但是已经有了一些重写规则: Options +Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^view/([0-9]+)/([0-9]+)/([A-Za-z0-9-]+)\.html/?$ data_view.php?id=$1&cat

有没有可能用page
http://welcome.com/about.php
插入类似此URL的内容
http://welcome.com/about/

但是已经有了一些重写规则:

Options +Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^view/([0-9]+)/([0-9]+)/([A-Za-z0-9-]+)\.html/?$   data_view.php?id=$1&cat=$2 [NC,L]

RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^data/include/(.+)?  Admin/$1


ErrorDocument 400 /page-not-found
ErrorDocument 401 /page-not-found
ErrorDocument 403 /page-not-found
ErrorDocument 404 /page-not-found
ErrorDocument 500 /page-not-found
更新

我在找
http://welcome.com/about.php?id=12&cat=13
转换为
http://welcome.com/about/12/13

让它像这样:

ErrorDocument 400 /page-not-found
ErrorDocument 401 /page-not-found
ErrorDocument 403 /page-not-found
ErrorDocument 404 /page-not-found
ErrorDocument 500 /page-not-found

Options +Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^view/(\d+)/(\d+)/([A-Za-z\d-]+)\.html/?$ data_view.php?id=$1&cat=$2 [NC,L,QSA]

RewriteRule ^data/include/(.*)$ Admin/$1 [L,NC]

# rewrite /about/ or /about to /about.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L]