Php htaccess URL重写文件是否视为文件夹?
有没有可能用pagePhp 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
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]