Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum page and page forum is on – URL redirect

  • @travis-s

    Participant

    So i’m setting up a site that will have a few different forums. I noticed that the forum-title (permalink) urls on the forum index directs to the forum and not the page that the forum is on.

    A little less confusing, if you follow the set-up guide… create your forums and then the corresponding pages, and then post the forum shortcode on that page. So you’re left with two different urls. One for the forum you created and one for the shortcoded page.

    Ideally, it would just be one forum page and one url. But then the problem you run into is that the forum post type is limited. You can’t use shortcodes and any textual content you add is shown inside the forum-info on the index.

    Now I could just redirect the forum-title(index) url to the shortcoded page, which isn’t a big deal. I just wanted to see if anyone else did something a bit different.

Viewing 1 replies (of 1 total)
  • @rachana7

    Participant

    You can update your .htaccess something like.
    RewriteEngine On

    # Redirect forum index URLs to shortcoded pages
    RewriteCond %{REQUEST_URI} ^/forum-index$
    RewriteRule ^(.*)$ /shortcoded-page [L,R=301]
    
    # Exception: Exclude specific paths from redirection
    RewriteCond %{REQUEST_URI} !^/forum1$
    RewriteCond %{REQUEST_URI} !^/forum2$
    RewriteRule ^(.*)$ - [L]
    

    With these rules, any request to /forum-index will be redirected to /shortcoded-page, except for requests to /forum1 and /forum2 which will not be redirected.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar