Remove "/pages" from pages URL?

Kevin

Well-known member
I'm working on something for an XF site where a series of static HTML pages will work out perfectly. However, I would really like not having the /pages identifier in the URL shown.

Organization wise I will be ending up with a page named (for example) Widgets. The Widgets page will be an overview with links to additional pages that are the details for each type of Widget. For example, Sprockets might be a type of widget.

What I would really love to end up with is the following URL structure for the XF pages.

{site.com}/forums
{site.com}/widgets
{side.com}/widgets/sprockets

Doable somehow? :coffee:
 
You can't remove the "pages" prefix entirely but you can change it with an addon, like this:

http://xenforo.com/community/threads/change-forums-route-to-view.22998/

I didn't make one for pages, but the code is very similar. You would need to extend the pages route instead of the forums route. Then define the new route in your Admin CP (as shown in the screenshot).
Jake, thanks. Though that can't remove it (thinking out loud, I wonder if .htaccess could be tricked somehow to do it) that is a pretty useful mod that I might be able to make use of for some other ideas floating around my head. (y)
 
Jake, I am not entirely sure what situations you'd use your addon - can you specify?

I've seen website where they've avoided to use the pages url. I've asked and got a reply stating that they used a custom plugin which totally avoided the buildin page function.
 
Jake, I am not entirely sure what situations you'd use your addon - can you specify?

This site used the route changer to translate all routes to spanish:

http://foroxenforo.net/paginas/manual/

pages = paginas

I've seen website where they've avoided to use the pages url. I've asked and got a reply stating that they used a custom plugin which totally avoided the buildin page function.

Yes that is possible. If you create your own addon then you can create your own route. But if you use a page node then you are bound to the "pages" route.
 
Top Bottom