US English (US)
FR French
DE German
SA Arabic
GR Greek
BS Bosnian

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Book a Demo
  • Product Updates
  • Contact Us
English (US)
US English (US)
FR French
DE German
SA Arabic
GR Greek
BS Bosnian
  • Home

Having Helpjuice Run On A Subdirectory Of Your Website (e.g. /help)

Written by Emil Hajric

Updated at December 21st, 2022

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Users Accessibility New to Helpjuice? Start Here Content Management Multiple Languages/Translations & Localization Multilingual Knowledge Bases Analytics Video Tutorials
  • Customization
    Customization Guides
  • API V2
  • API V3
  • Article Editor
  • Swifty (In-App Widget)
  • Billing / Subscription
  • Authentication
+ More

Having your knowledge base reside on a subdirectory of your website, rather than subdomain is better for SEO, and can make your knowledge base look more 'integrated' into your website. Luckily, the set-up to make this happen with Helpjuice takes only a few minutes if you are using NGINX or Apache for your server.

In order to set up Helpjuice to run on a subdirectory (subdir) on your site, you may copy the below code, instructions are as follows

  1. Determine if you are using Apache or Nginx
  2. Copy the appropriate code (if using Apache, use the Apache code, etc.)
  3. Make sure to replace all the yellow highlighted parts with your data. Red data is optional and only change if you want it elsewhere other than /help/
  4. Paste the code into your Server configuration file
  5. Restart your server 
  6. Prepend /help (or the /subdirectory you've setup) to all the links in your KB via Templates in Customize area (e.g.<a href="/help{{ category.to_language_url }}"></a>)


If you are using Apache and want to run it on /help/: 

First make sure you have the two required modules enabled:

sudo a2enmod proxy
sudo a2enmod proxy_http


Restart Apache for your new modules to load and add the following configuration:

ProxyPass "/help"  "https://yourAccount.helpjuice.com/"
ProxyPassReverse "/help"  "https://yourAccount.helpjuice.com/"


If you are on NGINX and want to run it on /help/

server {
  listen 80;
  large_client_header_buffers 4 16k;

  server_name yourwebsite.com;

  location ~ ^/help/?((?<=/).*)?$ {
    proxy_set_header Host yourAccount.helpjuice.com;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For yourAccount.helpjuice.com;
    proxy_pass https://yourAccount.helpjuice.com/$1$is_args$args;
    proxy_read_timeout 90;
    proxy_http_version 1.1;
  }
}


Troubleshooting common errors

1. Forms (like article feedback and contact us) aren't working.

  • If you're rewriting the requests, make sure that you're also changing the value of the Origin HTTP header to the account's subdomain in HJ: https://yourAccount.helpjuice.com.
  • Make sure that the cookies sent from our app are being forwarded to the browser. The form security depends on our session cookie. You should at least allow the following cookies:
    • _helpjuice_session_v2: this one is the most important and will allow the feature to work.
    • authorized_url_only_category_ids: used for URL-Only categories.

    • authorized_kb_encrypted_url_only: used for encrypted KBs - if your KB is encrypted.

    • authorized_url_only_question_id: used for questions with Shareable URLs.

    • current_user_language: used to save user preferred language.

    • segment_fields: if you use segmentation.

    • NOTE: You may have to rewrite the cookie's domain too since your app is running in a different domain than *.helpjuice.com. You will have to check the docs for your proxy. If you're using Apache or NGINX, these links might help you set it up.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

Copyright © 2023 - Helpjuice

Helpjuice, Inc. is a registered US Corporation, EIN # 45-2275731

Download W9
  • Help
  • Features
  • Pricing
  • About
  • Careers
  • Customers
  • Blog
  • Case Studies
  • Resources
  • Knowledge Base Examples
  • Privacy Policy
  • Terms of Service

Why is the knowledge base important?

With a knowledge base, you can allow your customers to self-help themselves, thus reducing your customer support by up to 60%. Furthermore, you can also have your team get instant answers to the questions they need without having to email themselves all using knowledge base software.

What is the purpose of a knowledge base?

The purpose of knowledge base software is to allow you to host your knowledge base/corporate wiki in one centralized 'hub'. Both your customers, and employees can now access information within seconds!

Made with from Miami, Bosnia, Morocco & Brasil

+1 (833) 387 3877 success@helpjuice.com
Expand