The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Mar 22, 2011 10:07 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Feb 28, 2011 10:08 pm
Posts: 11
I thought I'd help out, as this seems to be a common problem with very little complete advice, and a lot of bad advice. The Ubuntu docs only get Joomla installed, and don't go as far as enabling SEF URLs. I plan to put this into the docs pages somewhere soon.

Problem: For some people they can rename their htaccess file and click 3 radio buttons to get SEO options working.

For others... It fails. You've made an Ubuntu or WAMP server but the CMS website it's hosting can't use SEF URLs. You've followed the documentation for Joomla (or any CMS) to create SEF URLs, but it's broke. You can even get it working on a a site hosted by godaddy.com or hostgator.com - Perhaps you don't care about SEF URLs and you are trying to use the features of htaccess, yet it's broke.

In the example below I was using Ubuntu and the Joomla CMS installed into a folder called "joomla" with the sample content, and all 3 SEO settings=yes in the global configuration. XAMPP servers seem to have mod_rewwrite working with the default installer. WAMP needs the same fixes as Ubuntu.


errors observed in your web browser:

The server encountered an internal error or misconfiguration and was unable to complete your request
or
The requested URL /joomla/example-pages.html was not found on this server



steps for ubuntu server:
===========================================

1)go to the ubuntu command line

2)type the command: sudo gedit /etc/apache2/sites-available/default

notes: This is the default server configuration file using ubutu server

3) Make 2 changes to the code, see default code below
original: AllowOverride None
new: AllowOverride All

========segment of default code ===================

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

=========code end=======================

4) Save and close gedit


5) type the command: sudo a2enmod rewrite

notes: the ApacheENableModule tool (a2enmod) now enables the "rewrite" module for good. The next time you reboot, the module loads automatically

6) type this command: sudo /etc/init.d/apache2 restart

notes: this restarts the apache2 web server without rebooting your pc



7) test that .htaccess files are being loaded properly by apache

type the command: sudo mkdir /var/www/foofolder
type the command: sudo gedit /var/www/foofolder/.htaccess

in the file add these 2 lines below
Options +FollowSymLinks
Redirect /foofolder/foo.html http://www.google.com

Save and close gedit

8) Open a browser and test your server URL by adding foofolder/foo.htm

example url: localhost/foofolder/foo.html
result, you should see google

9) Follow the steps for SEF Urls in your docs for your CMS website
SEF = Search Engine Friendly
(the opposite of long URL's with querry strings)

10) For the Joomla CMS you would rename the default file
from: htaccess.txt
to: .htaccess
and set all 3 SEO settings to "yes" in the Joomla back end, global configuration

ubuntu command line: sudo mv /var/www/joomla/htaccess.txt /var/www/joomla/.htaccess

11) Done


Steps for a Wamp Server
===============================
use notepad to edit the file
c:\wamp\bin\apache2.2.11\config\httpd.conf

Your folder may have a different apache version

search for the text "rewrite"
remove the pound symbol # - at the start of that line of text

search for the text "None"
change it to "All" in both places as noted in step 3 above

save and exit notepad

click start, run, cmd.exe
type the commands
c:
cd\
cd wamp
cd www
cd joomla
rename htaccess.txt .htaccess

use the mouse to click the wamp menu stop all, then start all


Top
 Profile  
 
PostPosted: Mon Sep 19, 2011 1:33 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jun 03, 2010 8:54 am
Posts: 3
Location: United Kingdom
Thanks a lot. I have been on my test server with non-SEO URL friendly since an year. Your article is really helpful as now I can develop my components with SEO friendly URL


Top
 Profile  
 
PostPosted: Fri Sep 23, 2011 1:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Feb 28, 2011 10:08 pm
Posts: 11
THanks. For Ubuntu you only need to do steps 1-5 and then reboot.

Steps 6-11 verify you've done the fix completely.


Top
 Profile  
 
PostPosted: Wed Oct 09, 2013 4:22 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 27, 2005 4:09 pm
Posts: 83
Location: Golden, CO
Excellent find!

Thanks for posting

_________________
http://www.spintheweb.com


Top
 Profile  
 
PostPosted: Thu Dec 26, 2013 10:33 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Mon Sep 20, 2010 7:58 am
Posts: 857
Location: Jakarta - Indonesia
Thanks alot!! I've been looking for this for my WAMP server at the local computer for so long. Great Job.

_________________
Regards,
enbees, I'm here: http://koperasoft.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 



Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group