XF 2.1 Creating a new page with a shorter URL

colcar

Active member
Is there a way to create a page that has a URL like website.com/newpage rather than website.com/pages/newpage
 
I did try that but what I'm also trying to do is putting a redirect in cpanel from the page I'm creating and it doesn't seem to work if I use a route filter.

I have a donations page and the URL is not ideal https://streamlabs.com/onlyonecardiffcity/tip

so I'm trying to create a page on my forum that is better to give out to my users such as cardiffcityforum.com/tip

but when I use a route filter to change cardiffcityforum.com/pages/tip to cardiffcityforum.com/tip it stops the redirect I set up in cpanel from working.

Sorry if that's confusing, let me know if you're not understanding what I've written here.
 
Not really sure I follow but you can't set up a route filter in XF to redirect to a URL on another domain - that's not what the feature does.

What is the purpose of the page if the donation link is on another domain/URL?
 
The donations link that streamlabs give you (https://streamlabs.com/onlyonecardiffcity/tip) is a bit long and I'd prefer to be able to give out a URL that has more relevance to my forum and is a bit shorter such as cardiffcityforum.com/tip

To make this happen, in cpanel I set cardiffcityforum.com/tip to redirect to streamlabs.com/onlyonecardiffcity/tip

However this redirect doesn't work when I have to use a route filter in Xenforo to change cardiffcityforum.com/pages/tip to cardiffcityforum.com/tip

Basically all I want is to be able to give my users this link cardiffcityforum.com/tip and for it to go to streamlabs.com/onlyonecardiffcity/tip

but using a route filter to remove the word "pages" from the URL breaks the redirect I set up in cpanel.
 
You don't need a page or route at all since it's not on your site.

delete the page and the cpanel rules. just use an htaccess rule to 301 /tip -> streamlabs.com tip page

Code:
Redirect 301 /tip http://www.streamlabs.com/onlyonecariffcity/tip

put it in htaccess above the xf rules but after RewriteEngine on
 
You don't need a page or route at all since it's not on your site.

delete the page and the cpanel rules. just use an htaccess rule to 301 /tip -> streamlabs.com tip page

Code:
Redirect 301 /tip http://www.streamlabs.com/onlyonecariffcity/tip

put it in htaccess above the xf rules but after RewriteEngine on
Ah that's wonderful, thanks for that, I'll give it a go now (y)
 
You don't need a page or route at all since it's not on your site.

delete the page and the cpanel rules. just use an htaccess rule to 301 /tip -> streamlabs.com tip page

Code:
Redirect 301 /tip http://www.streamlabs.com/onlyonecariffcity/tip

put it in htaccess above the xf rules but after RewriteEngine on
Worked a charm, thanks for that (y)
 
Top Bottom