TYPO3 extension real_url returns 404 on all pages

…衆ロ難τιáo~ 提交于 2019-12-11 21:15:11

问题


assume the following pagetree structure

  • root
  • client1
    • page 1
    • page 2
    • page 3
  • client2
    • page 1
    • page 2
    • page 3

by default TYPO3 will display the page by id /index.php?id=[pid]

I'm trying to achieve the following effect

/client1/page1

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/ 

in my setup.ts field in my template

realurl.basic.enableAutoConf = 1

in the extension's configuration page

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 the absRefPrefix is now added to the resources

e.g. /client1/fileadmin/assets/images/logo.jpg

whats wrong with this picture?

update 1:

setting absRefPrefix = / did 'fix' everything everything however I'm not meeting the client requirement now

the client's name should be in the URL in this format mysite.com/client1/page1

right now I see mysite.com/page1

the client name is being skipped that was reason I added the client name in the absRefPrefix


回答1:


Just like "user" i have to ask... why not place everything under root?

Then use:

config.absRefPrefix = /
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1

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.



来源:https://stackoverflow.com/questions/19706949/typo3-extension-real-url-returns-404-on-all-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!