[英]How to Remove Project name From Url
I removed hash tag from url using $locationProvider.html5Mode(true)
我使用$locationProvider.html5Mode(true)
从url中删除了哈希标记
and then i tried to resolve refresh problem using following code in my htcaccess file 然后我尝试使用我的htcaccess文件中的以下代码解决刷新问题
Options +FollowSymlinks
RewriteEngine On
RewriteBase /test/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(css|js|html|png|jpg|jpeg|gif|txt)
RewriteRule (.*) index.html [L]
Now the url looks like 现在网址看起来像
http://diafriends.hostoi.com/test/
http://diafriends.hostoi.com/test/about
http://diafriends.hostoi.com/test/contact
Now i want to remove the test
from above url. 现在我想从上面的url中删除test
。 how can i do that??? 我怎样才能做到这一点???
First of all remove the default.php file of your hosting provider from your folder and then add the following to htaccess : 首先从您的文件夹中删除托管服务提供商的default.php文件,然后将以下内容添加到htaccess:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(css|js|html|png|jpg|jpeg|gif|txt)
RewriteRule (.*) /test/index.html [L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.