简体   繁体   English

TYPO3:每个网址末尾只有.html

[英]TYPO3: only have .html at the end of each URL

I'm using RealURL and the website can be reached by 我正在使用RealURL,可以通过以下网址访问该网站

www.domain.com/sitemap.html and www.domain.com/sitemap www.domain.com/sitemap.htmlwww.domain.com/sitemap

Now the website should be only reachable by 现在该网站只能通过以下方式访问

www.domain.com/sitemap.html

How can this be done? 如何才能做到这一点?

I found the config 'defaultToHTMLsuffixOnPrev' => '.html' , but I don't know if this is the right option. 我发现配置'defaultToHTMLsuffixOnPrev' => '.html' ,但是我不知道这是否是正确的选择。 Also there are some possibilities with .htaccess , but this should be only valid for sites (not pictures, pdfs ...). .htaccess也有可能,但是这仅对站点有效(不适用于图片,pdf ...)。 What is the right way doing this? 正确的做法是什么?

Use the extension Force RealURLs , it forces the access to pages to be made only by the configured URL-scheme in RealURL. 使用扩展名Force RealURLs ,它强制仅由RealURL中配置的URL方案访问页面。 Extension Forcerealurls . 扩展Forcerealurls Tested & certified by me :). 经过我的测试和认证:)。

Also, make sure to use canonical URLs in your HEAD section. 另外,请确保在HEAD部分中使用规范的URL。 German Tutorial . 德语教程 Use Canonical if you don't like to fiddle around with TypoScript. 如果您不喜欢摆弄TypoScript,请使用Canonical

There is an extension that promises to solve both issues, but I haven't tested it yet: Extension Stop Duplicate Content 有一个扩展程序有望解决这两个问题,但我尚未对其进行测试: 扩展程序停止重复内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM