custom-pages
custom-pages copied to clipboard
Rewrite custom page urls
I'd love to rewrite custom page urls by removing the /p/
suffix and also have better handling of GET
parameters, example:
host.com/p/customPage => host.com/customPage
host.com/p/customPage&subPage=list => host.com/customPage/list
But I can't even get the /p/
suffix removed, I've tried various .htaccess rules but all fail with "Page not found", examples:
RewriteRule ^customPage$ /p/customPage [L,NC]
RewriteRule ^customPage$ index.php/p/customPage [L,NC]
RewriteRule ^customPage$ index.php?r=custom_pages%2Fview&id=29 [L,NC]
RewriteRule ^customPage$ index.php?r=custom_pages/view&id=29 [L,NC]
I tried different combinations of flags like pass-through [PT]
but can't get this rewrite working at all.
Any suggestions?
@Mazvy did you get anywhere with this? I have trailing /'s on all my urls but when I create a custom page within a space, even just a link I get a custom_pages url that looks like this "https://ichor-studios.co.uk/g/smore-wars/custom_pages/view?id=25"
No trailing slash is added after 'view' and I imagine you might have come across a way to amend that if you've been diving into things since last year.
@Mazvy did you get anywhere with this? I have trailing /'s on all my urls but when I create a custom page within a space, even just a link I get a custom_pages url that looks like this "https://ichor-studios.co.uk/g/smore-wars/custom_pages/view?id=25"
No trailing slash is added after 'view' and I imagine you might have come across a way to amend that if you've been diving into things since last year.
I gave up :D
Well, to be fair - I didn't, in the sense that I just made subdomain redirects to the custom pages I wanted to rewrite URLs for.
In the end that turned out even better as that was the most important goal I had - to make certain pages easy to just verbally communicate to someone and also easily identifiable in written text. Subdomains solved that, albeit, unfortunately the URLs after those redirects do look ugly. I also used custom pages beyond what they were meant for and essentially have a "CMS" built under one page via request parameters, but that's a me issue and not a humhub issue.