Ich versuchemod_rewrite% {} REQUEST_URI umleiten domain.com/category zu category.domain.com
https://www.example.com/category/ und all seine Unterkategorien und Inhalt https://category.example.com
Also am Ende zu umleiten I wurde zB
https://category.example.com/subcategory/content=xyz;param=1
von
Umleitunghttps://www.example.com/category/subcategory/content=xyz;param=1
Ich habe hier eine ganze Menge Anregungen von anderen Threads versucht, bekam aber nur
https://www.example.com/category/subcategory/content=xyz;param=1
https://category.example.com/
und
https://www.example.com/category/subcategory/content=xyz;param=1
https://category.example.com/category/subcategory/content=xyz;param=1
arbeiten. Ich denke, es ist meine Regex, aber ich bin mir nicht sicher. Meine config
RewriteEngine On
RewriteLog /var/log/vgn_rewrite.log
RewriteLogLevel 5
RewriteCond %{HTTP_HOST} !category.example.com$ [NC] [OR]
RewriteCond %{REQUEST_URI} ^(.*)/category/(.*)$
RewriteRule ^/(.*)$ https://category.example.com$1 [R=301,L]
Mmh, ist/Kategorie immer/Kategorie oder ist es jedes Mal dynamisch anders? – Brum
/Kategorie ist statisch. Aber alles, was kommt nach/Kategorie ist dynamisch –
Ich bearbeitet meine Awner – Brum