Apache 如何隐藏url?

Apache 如何隐藏url?,apache,Apache,我想通过.htaccess文件中的重定向规则隐藏URL。 假设我的URL是192.168.1.2/abc/xyz/index.html 我只想显示192.168.1.2/abc#如果您的托管空间中安装了mod rewrite,您可以为 # if you have mod rewrite installed in your hosting space, you can enable pretty url for # compressed css/js by uncommenting followi

我想通过.htaccess文件中的重定向规则隐藏URL。 假设我的URL是192.168.1.2/abc/xyz/index.html

我只想显示192.168.1.2/abc

#如果您的托管空间中安装了mod rewrite,您可以为
# if you have mod rewrite installed in your hosting space, you can enable pretty url for
# compressed css/js by uncommenting following lines

#RewriteEngine On
#Options FollowSymLinks
#RewriteRule   ^packs/(\w+)\.(css|js)   packs/jscsscomp.php?q=$1.$2 

Options +FollowSymlinks
Options -Indexes

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L,QSA]

#AuthUserFile /var/www/example.com/public_html/.htpasswd
#AuthType Basic
#AuthName "Login Details Required" 
#require user yourname

<Files .htaccess>
order allow,deny
deny from all
</Files>
#通过取消以下行的注释来压缩css/js #重新启动发动机 #选项如下符号链接 #重写规则^packs/(\w+)\(css|js)packs/jscsscomp.php?q=$1.$2 选项+FollowSymlinks 选项-索引 重新启动发动机 重写cond%{REQUEST_FILENAME}-D 重写cond%{REQUEST_FILENAME}-F 重写规则。index.php[L,QSA] #AuthUserFile/var/www/example.com/public\u html/.htpasswd #AuthType Basic #AuthName“需要登录详细信息” #需要用户名 命令允许,拒绝 全盘否定