Support Knowledge Base

SEO Friendly URLs Not Working

Here are some of the most common reason why SEO Friendly URLs are not working for PHPKB knowledge base software on your server (assuming you are running Apache as your web server).

1) Your site is in a sub-directory, or you're using an Alias, but you did not set RewriteBase in .htaccess file

If your site URL looks like this:

http://example.com/phpkb/

Then you need to add or set RewriteBase! Find the section in your .htaccess file that looks like this:

.htaccess

# Modify the RewriteBase if you are using PHPKB in a subdirectory and the rewrite rules are not working properly.
#RewriteBase /phpkb

And change the last line, like this:

.htaccess

RewriteBase /phpkb

Make sure you remove the # symbol in front of RewriteBase, otherwise this will not work.

If you move your site later on, this line will need to be changed again. For example, if you later move it to: http://your-site-here.com/ then update the line to RewriteBase / (or just comment it out with a # in front).

VARIANT. When using an Alias, if your site URL looks like this:

http://example.com/YourAliasName/


Then you must change the last line as stated above, like this:

.htaccess

RewriteBase /YourAliasName

 
IMPORTANT NOTE

If RewriteBase section does not exist in your .htaccess file then you need to add it after  RewriteEngine on line.

2) .htaccess file did not get uploaded when you uploaded PHPKB package onto server.

Check if the .htaccess file was actually uploaded. It should be in the directory where you uploaded PHPKB (for example: /public_html/phpkb/)

If the .htaccess file is missing, you need to upload it. If you accidentally deleted this file, just extract PHPKB again that you downloaded earlier, and copy the new .htaccess file.

Make sure the file is only called .htaccess and not htaccess.txt or anything else. The .period .at .the .beginning is required.
This name usually means that the file will be invisible on folder listings on Unix-based systems so you might not always see it. If using an FTP client, you may have to configure it to 'show hidden files'. If listing on the commandline, you must ls -la to see it. This will be somewhat dependent on your OS.

3) Your .htaccess file is corrupt

The .htaccess file is very fussy, and only works if things are in a certain order. If you have tried to add password protection or to block image hotlinking (especially if you used cPanel or some other software to set that up), you have probably corrupted the file. The simple solution is to delete your corrupted .htaccess file, then upload the standard version that comes with PHPKB.

Evidence of a broken .htaccess file can usually be seen in the Apache logs. If you have access on the host, the logs may be at /var/log/apache2/error.log or some variation like that. If you are on a shared host, see your ISPs documentation or helpdesk.

4) .htaccess rules modified

If you have made any changes in the default rules that were present in .htaccess file then please rollback the changes or ask someone to assist you on this, and it is advised not to make any direct changes in .htaccess file until and unless you don't know what you are really doing, or your site might stop working properly.

5) Check AllowOverride setting in httpd.conf file

Also make sure that you have set AllowOverride to All (as shown below). By default, it is AllowOverride None .

httpd.conf

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

Important: This change requires a restart of your web server to take effect.

3.25 (4)
Article Rating (4 Votes)
Rate this article
Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
Support Subscription Renewal - Commonly Asked Questions
Viewed 7403 times since Wed, Jun 25, 2014
How do I migrate/move my installation of PHPKB to another server?
Viewed 13111 times since Sat, May 12, 2012
Installation of the Attachment Indexing plugins
Viewed 86043 times since Tue, Feb 12, 2013
Can I use the PHPKB software without active support subscription?
Viewed 9794 times since Mon, Aug 8, 2011
Why should I renew my software maintenance?
Viewed 11109 times since Mon, Aug 8, 2011
How to set up folder permissions in Internet Information Services (IIS)?
Viewed 14588 times since Thu, Mar 10, 2016
How to motivate people to contribute to a Knowledge Sharing System?
Viewed 70714 times since Mon, Nov 7, 2011
SEO Friendly URLs not working in PHPKB
Viewed 6668 times since Tue, Apr 11, 2017