3

I want to use RealUrl extension in my typo3 site. What I want to do:
change the usual url

"http://mysite.it/pag/index.php?id=1"

into

"http://mysite.it/pag/1"

(I wanto to hide "index.php?id=")

Is it possible to do it using RealUrl? Can someone help me? (conf example) Thank you

GiuseppeG
  • 31
  • 1
  • Yes, this is certainly possible. Please tell us what you tried already. A start would be to install realurl and clear the caches. – Jonas Eberle Jul 03 '18 at 13:23
  • Another way is to do it with RewriteRule in .htaccess. May this is faster. – Heinz Schilling Jul 03 '18 at 13:39
  • I have tried to install the latest RealUrl and it creates the realurl_autoconf.conf file. But I cannot undestand how to modify the default to obtain url like /pag/number. I don't want a spaeking url I wanto only the page id. Is it realy possible with realUrl. Thank you – GiuseppeG Jul 09 '18 at 12:38

1 Answers1

0

In this way you probably do not need realurl.

Any url of type https://mydomain.tld/?{pageid} will be mapped by TYPO3 core to index.php?id={pageid} so you need just a small htaccess rewrite to insert the questionmark.

It is just that links are not generated in this short form. But that could be done by a lastplace replacement (do a stdWrap.replacement on the PAGEobject):

page = PAGE
page {
    10 = ...
    :

    stdWrap.replacement {
        1.search = index.php?id=
        1.replace =
    }
}

Your request reminds to the core-extension simulate static, but that might be obsolete and the pattern differs from your request. It was https://mydomain.tld/{pagetitle}.{pageid}[.{pagetype}].html. For the default-pagetype 0 the pagetype does not need to render.

Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
  • I have a doubt about RewriteRule. I added a rewrite rule like the following inside the .htaccess in /page directory RewriteRule ^([0-9]{1,})/?$ \?$1 to rewrite i.e. /pag/3 into /pag/?3 but on our site there are url like /pag/21400/?MP=21400-128 (with a query string) and my poor rewrite rule does not work. Have you an example of better rewrite rule? – GiuseppeG Jul 09 '18 at 12:29