我当前的http访问文件是
# Pound sign comments a line out
# Disallow viewing of htaccess files
<Files .htaccess>
order allow,deny
deny from all
</Files>
Options +FollowSymLinks
RewriteEngine On
# enable hiding php extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php
现在它只是隐藏.php,我仍然想隐藏.php但允许网站/用户/用户名
答案 0 :(得分:1)
你走了:
RewriteEngine On
RewriteRule ^user/(.*) profile.php?user=$1 [L]