TYPO3扩展real_url在所有页面上返回404 [英] TYPO3 extension real_url returns 404 on all pages
问题描述
假设以下页面树结构
- 根
- client1
- 第1页
- 第2页
- 第3页
- root
- client1
- page 1
- page 2
- page 3
- 第1页
- 第2页
- 第3页
默认情况下,TYPO3将通过id/index.php?id=[pid]
by default TYPO3 will display the page by id /index.php?id=[pid]
我正在尝试实现以下效果
I'm trying to achieve the following effect
/client1/page1
/client1/page1
所以我遇到了realurl扩展名,我确实设法使其起作用,并且设置后在url中获得了预期的结果
so I came across the realurl extension which I did managed to make it work and I got the expected result in the url after setting
config.absRefPrefix = client1/
在模板的setup.ts字段中
in my setup.ts field in my template
realurl.basic.enableAutoConf = 1
在扩展程序的配置页面中
in the extension's configuration page
但是现在当我像这样
/client1/page1
访问它们时,我在所有页面上都得到一个404,并且 当我通过id访问它们时,我只会得到没有任何CSS图像和JavaScript的内容 因为absRefPrefix
现在已添加到资源but now I'm getting a 404 on all pages when I access them like this
/client1/page1
and I only get the content without any css images and javascript when I access them over id because theabsRefPrefix
is now added to the resources例如
/client1/fileadmin/assets/images/logo.jpg
这张图片怎么了?
更新1:
设置
absRefPrefix
=/确实修复"了所有内容,但现在我不满足客户要求setting
absRefPrefix
= / did 'fix' everything everything however I'm not meeting the client requirement now客户名称应采用以下格式的网址
mysite.com/client1/page1
the client's name should be in the URL in this format
mysite.com/client1/page1
现在我看到
mysite.com/page1
客户端名称被跳过,原因是我在
absRefPrefix
the client name is being skipped that was reason I added the client name in the
absRefPrefix
推荐答案
就像用户"一样,我不得不问...为什么不将所有内容都放在根目录下?
Just like "user" i have to ask... why not place everything under root?
然后使用:
config.absRefPrefix = / config.simulateStaticDocuments = 0 config.tx_realurl_enable = 1
回答更新1: 在页面属性的常规"选项卡中,检查页面Client1和Client2:不应从口述URL中排除.默认情况下,如果根页面包含域,而客户端页面实际上是页面而不是其他网站,则RealUrl应该创建您要查找的结构.
Answer to update1: Check the pages Client1 and Client2, in page properties, general tab: Exclude from speaking URL should be left unchecked. RealUrl should by default create the structure you are looking for if the rootpage holds the domain and the client pages are really pages and not different websites.
这篇关于TYPO3扩展real_url在所有页面上返回404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!