1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Rewriting query url to SEO friendly url

Discussion in 'XenForo Questions and Support' started by 1BJK903, Feb 14, 2014.

  1. 1BJK903

    1BJK903 Active Member

    Is this possible? I want the recent posts to be my homepage, so I have to use the URL with the query.

    The recent posts URL is this: http://domainname.com/subfolder/?find-new/posts&recent=1

    What I want is: http://domainname.com/ + maintaining the querying page.

    What I did:
    RewriteEngine On
    RewriteBase /subfolder/

    RewriteCond %{THE_REQUEST} /\?find-new/posts&recent=1\s [NC]
    RewriteRule ^$ /subfolder/? [L,R=301]

    RewriteCond %{QUERY_STRING} ^$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^$ ?$1?find-new/posts&recent=1 [L,NC,QSA]

    Result? It redirects me to http://domainname.com BUT, it does not query and it is not the right page. It shows me the forum page instead of the recent posts.

    Is there a workaround for this?
  2. 1BJK903

    1BJK903 Active Member

    No one who can help?
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I have been unable to get this working.

    A redirect is certainly doable, but you want to abstract the URL.

    One option is to create a small addon. That would give you the control you need. This requires some coding ability though.
  4. 1BJK903

    1BJK903 Active Member

    Thanks for trying to help me. Well, could you send me to the right direction? How would I start? I thought of making the homepage static by using find_new_posts as template and converting it to HTML but I could not get that working. How would I make an add-on?
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  6. 1BJK903

    1BJK903 Active Member

    Not needed anymore. I solved it with the Widget Framework. What I tried to do with htaccess was impossible.

Share This Page