我在网站上使用不同的页面。我想隐藏用户的地址栏中的网址。
我有以下网页:
www.example.com
www.example.com/system/index.php
www.example.com/system/pages/page1/index.php
我想隐藏www.example.com/system/pages/page1/index.php
之类的网址,并在地址栏中显示http://system.example.com
我该怎么做?
编辑1:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+dirname/([^\s]+) [NC]
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (?!^dirname/)^(.*)$ /system/$1 [L,NC]