HTML -脚本-隐藏"/index.html"文件时,转到domain.com/example
HTML - Script - hide the "/index.html" file when going to domain.com/example
例如:在apple的网站上,当我去apple.com/support时,我会来到apple.com/support/,它应该是apple.com/support/index.html,但index.html没有显示。
我想在我的网站上:www.jonathangurebo.se例如,当去jonathangurebo。我将到jonathangurebo.se/contact/index.html,我不想显示index.html。
我该如何解决这个问题?
也许添加一些行到我的。htaccess文件?因为去jonathangurebo的时候。Se/mlkhgljfehgljfebgfgb它会来到我的错误404页面,并在我的地址栏显示相同的链接。这里不是真正的链接jonathangurebose/error/404.html
您的网站显示index.html
部分的唯一原因是因为您将其添加到HTML页面中。而不是让like like so:
<a href="http://www.jonathangurebo.se/apps/index.html">Apps</a>
你应该创建如下链接:
<a href="http://www.jonathangurebo.se/apps/">Apps</a>
一切都会如你所愿!:)
index.html或index.php大多是默认文件,每个浏览器"首先看"链接到www.jonathangurebo.se/contact/,它会自动打开www.jonathangurebo.se/contact/index.html而不会在浏览器中显示"index.html"
试试http://www.jonathangurebo.se/contact/
你是对的,你需要添加一些东西到你的。htaccess文件。
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}'s(.*)/index'.php [NC]
RewriteRule ^ /%1 [R=301,L]
From DirectoryIndexRedirect
默认情况下,选择DirectoryIndex并透明地返回给客户端。
如果你在某个地方设置了这个指令,你必须删除它。如果你可以在。htaccess中重写它,使用
DirectoryIndexRedirect off
- 如何覆盖锚点元素's href目标,并在我点击转到目标javascript时删除其他错误
- 单击Chrome通知后,转到已打开的选项卡
- 转到另一个页面,然后立即触发ScrollTo
- 基于提交值/名称的Javascript跳转到锚点
- 书签:转到嵌入YouTube页面
- 阻止在单击链接后转到页面顶部
- 浏览器跳过“;如果“"否则如果“;,直接转到“;否则”;陈述
- 更改跳转到URL操作SSRS 2008 R2的链接目标属性(rc:LinkTarget)
- 如何记录.pushState(),然后立即转到URL栏中的页面
- Div 转到错误的位置
- 点击链接时,它应该滑动到其地址,而不是直接转到
- 如何禁用在Bootstrap中不完成一步就转到下一步
- 我这里有两个表格,在提交验证第一个表格后,我如何转到第二个表格进行验证
- tabindex按顺序进行,如果在中心遗漏了什么,则转到tabindex 1
- 如果设置了位置,如何在每个状态下检查路由器ui,如果没有,则转到登录页
- 传递带有符号“”的字符串变量'"到函数
- Twitter引导标签:如何跳转到锚点
- 需要一个链接才能转到某个页面,然后快速返回到当前页面
- 功能点击使打开新链接,不转到原始链接
- 当点击<a href="#"></a>don'I don’我不想转到页首