XF 2.2 404 Error - Friendly URLS

mle

New member
Hi,

First question:

i want to use friendly URLs on my board (www.shisha-spirit.com).

  • Apache is activated through plesk (nginx proxy mode activated)
  • mod_rewrite is activated
  • Index page route through is: /forums/ (xenforo basic options admin panel
htaccess content:

# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
RewriteBase /forums

# This line may be needed to workaround HTTP Basic auth issues when using PHP as a CGI.
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>

i am really confused. Could someone help me ?

Secound question:

I dont want to use /forums/ instead just TLD/threads/ TLD/members etc. Shall i delete /forums/ adding in index page route and htaccess?

Thank you very much
 
Last edited:

Tracy Perry

Well-known member
You need to comment out the ReWriteBase /forums as if you are installed in the root as the /forums is a route and does not need to be addressed in your .htaccess as it is actually a route.
Now, if you have it installed in an actual sub-directory called forums then you will need it... but then you will see /yourforum.com/forums/forums in the browser address bar.
 

mle

New member
You need to comment out the ReWriteBase /forums as if you are installed in the root as the /forums is a route and does not need to be addressed in your .htaccess as it is actually a route.
Now, if you have it installed in an actual sub-directory called forums then you will need it... but then you will see /yourforum.com/forums/forums in the browser address bar.

Shall i edit the Index page route in the admin panel also ?
 

mle

New member
You need to comment out the ReWriteBase /forums as if you are installed in the root as the /forums is a route and does not need to be addressed in your .htaccess as it is actually a route.
Now, if you have it installed in an actual sub-directory called forums then you will need it... but then you will see /yourforum.com/forums/forums in the browser address bar.

Unfortunately after this change, i still get a 404 Error. E.g. https://www.shisha-spirit.com/forums/main-forum.2/

I restarted the apache also after this change.
 

Tracy Perry

Well-known member
Shall i edit the Index page route in the admin panel also ?
your not going to get around the /forums/ or similar.. it's simply a fact of the way XF works. You can rename it, but you will always have (unless you obtain a bespoke add-on) yoursite.com/somethinghere/node.x
If you've gone and tweaked the routes or similar you should not have issues... as the routes are handled by XF itself.
 

Brogan

XenForo moderator
Staff member
If the .htaccess file is in place and it doesn't work then the server is not configured to support FURLs.

Contact your host and they should be able to resolve it.
 
Top