How to Enable Short URLs for Your phpFox Website
Written by Stephanie Brown Wednesday, 24 October 2012
This article will focus on enabling short urls for your phpFox website.
By default, phpFox does not use short urls. This means that your website’s url’s will have a string that looks similar to this:
using short urls, the url will look similar to this:
Short urls look cleaner, and are easier for your members to use.
Creating/Editing the .htaccess file
The first step to doing this is to open your file manager in cpanel or your ftp program and browse to the root folder of your phpFox website. If there is already a .htaccess file in that folder, rename it to htaccessbackup.txt. By default, Arvixe loads a blank .htaccess file in your root directory. If you have entered any information into this file, you will want to transfer that to the new htaccess file we will create shortly.
In this same folder you should see a file named htaccess.txt. This file is part of phpFox. Rename this file to .htaccess. If you had added any information to the default .htaccess file mentioned in the previous paragraph, you will want to copy that information into the new .htaccess file.
Your root file directory should now look like the following:
If you installed phpFox in the root directory of your website, then you do not need to make any further edits to the .htaccess file.
If you have installed phpFox in a sub directory, you will need to edit the .htaccess file. Open it and look for:
and change that to
(foldername being the name of the folder you installed phpFox in).
Editing the server.sett.php file
After you have finished the edits to the .htaccess file, you will need to make a small change in the server.sett.php file.
Using the file manager or ftp program, navigate to /include/setting/ folder.
Open and edit the server.sett.php file. Look for:
$_CONF['core.url_rewrite'] = ’2′;
and change this to
$_CONF['core.url_rewrite'] = ’1′;
If you are unable to make the change to the file, and are getting an error stating you do not have permission to do so, go back to the file manager and chmod the server.sett.php to 777, make the edit above, and then chmod the server.sett.php file back to what it was previously.
Refresh your website and browse the site pages. You should be able to see this change effective immediately.
Congratulations! Your website should now be using short urls!