DISCUSSION: Search Engine Friendly URLs (SEF)

Discuss the FAQ's here, and get in touch with the FAQ Team.
redhatmatt
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Jan 19, 2006 8:43 pm
Location: Someplace, California
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by redhatmatt » Wed Mar 22, 2006 4:43 am

Long saga, I will summarize... and try not to flame me. I have followed whole SEF "thing."

Emir wrote the original SEF... there are too many ways to write it, and putting in extra features can add much overhead. Some want extra some do not.

-So emir wrote the "advanceSEF" - "compiled" with ionCube and speedy... sort of idiot proof. Commercial but cheap.
-Then there is the OpenSEF component - I have tested up to rev 4 presently. Open Source, "Free" lot of options... can be a pain, half idiot proof depending on how fancy you get with parameters.

There needs to be a better description for each kind of SEF in Joomla/Mambo, cause I thin everyone is confused on what SEF can or should look like as a URL.

Here is what I mean:
Here is a Joomla URL with no SEF on at all:
http://vistarealestate.org/index.php?op ... &Itemid=35
LONG HUH? ugly and not very friendly

Here is a Joomla URL with default SEF on (in global configuration/SEO tab ((and dynamic titles, just have to do with titles not URLS)):
http://vistarealestate.org/content/blogsection/1/35/
(so this is termed SEF, a little bit long and looks crawlable, I guess.... no - I know cause I've had good google SEO results with this)

Then with openSEF or advanceSEF on:
http://vistarealestate.org/news/
(Same link... believe it or not... also termed "SEF", but totally cool and somewhat troublesome as Joomla gets confused by component names and content items like Contact Us (Static Page) and Contact.)
I find for most of my sites openSEF works stellar.

Now what the stellar fellow and developer kawika was talking about was fixing this small confusion between content items and components IN THIS LAST EXAMPLE- properly, right now... not in the slower, wise, upgrade cycle in joomla stable.
My hack is in openSEF when it says something that conflicts go to the component admin of openSEF and use the replacement tab... and for anyinstance like contact or a duplicate menu item simply put in something similar like connect  as a replacement for contact... your menu item will stay the same, but you'll notice the url "folder" will be connect. If this does not work... use Core Alias tab and clear what you did in replacements. Trial and error, depends on the situation. I've really had to muck with it and probably have an example of what you may be doing or trying to do.

Anyways, to summarize hours of reading the SEF saga... leave poor Emir alone. The guy is cool, he may well have to write a book on just why he did what he did, and does what he does and then record him reading it as a free mp3 for everyone. He is or was or still is in charge of the troubled task of developing core SEF for joomla in a balanced way. Everyone has a different opinion of what that should be.

There are so many issues. I am preparing documentation dealing with SuSE personality problems with modphp, and new issues with certain cgi's vs. the new htaccess file in 1.0.8 because of personal requests because of my posts here on the forum.... these ALL have to do with the issues of Joomla SEF.

OK. the windbag stops now.
-Matty  ;D

PS. Saw Kenmcd just posted while I was writing this. Kenmcd rocks.
He's openSEF which I use... note- good luck using advanceSEF for development site tryout... will not work with straight ip URL, locked to actual domain name! -oh well.

User avatar
compass
Joomla! Ace
Joomla! Ace
Posts: 1347
Joined: Fri Aug 26, 2005 1:31 am
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by compass » Wed Mar 22, 2006 1:34 pm

crawlable
Thanks for that summary!

Worth noting that SE's can crawl even the index.php? URL's these days. SEF doesn't have too much to do with SEO as a result. More to do with human readbility and linking campaigns....
Follow me on Twitter @compassdesign
www.compassdesigns.net - Get get free templates and news for Joomla
simplweb.com/joomla-hosting - Fully Managed Joomla Hosting - Unlimited Support

kawika
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 108
Joined: Mon Nov 21, 2005 9:27 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by kawika » Wed Mar 22, 2006 7:27 pm

redhatmatt,

Thank you for the update and tip on using OpenSEF. I'll give it a shot.

redhatmatt
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Jan 19, 2006 8:43 pm
Location: Someplace, California
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by redhatmatt » Thu Mar 23, 2006 3:07 am

Here is another person with the SuSE problem I mentioned earlier... and the fix links I put in earlier that he used... Personal messages are kinda bad cause no one else gets to see... perhaps the more examples to fix a problem the better.

Sapient
Newbie
*
Offline Offline

Posts: 36

Re: (No subject)
« Sent to: redhatmatt on: March 21, 2006, 02:59:55 PM »
« You have forwarded or responded to this message. »
Reply with quote Reply Remove this message
Matt,
  Thanks for the response.  I got it loaded.  For some reason it never took the original changes.

I am now having issues when trying to log in; I get the Error 400.  Think I read something on it earlier.


Bad request!

Your browser (or proxy) sent a request that this server could not understand.

If you think this is a server error, please contact the webmaster.
Error 400
Report To Admin
----

Thank you,
Sapient
Newbie
*
Offline Offline

Posts: 36



View Profile WWW Email Personal Message (Offline)

(No subject)
« Sent to: redhatmatt on: March 21, 2006, 09:31:30 AM »
« You have forwarded or responded to this message. »
Reply with quote Reply Remove this message
Matt,
  Found this thread and was floored.  I have been looking for this for some time.  I use SuSE 9 Enterprise.  Could not find anything on Apache or the SuSE support portal sites.

Thank you!

http://forum.joomla.org/index.php/topic ... #msg210058
"Anyone having trouble with SuSe, mod_rewrite, SEF, OpenSEF..... all on suse..."


I followed all the directions here: http://enarion.net/web/apache/htaccess/ ... e-on-suse/

Of course I have a question for you.

When I ran this: SuSEconfig

The output was:

Starting SuSEconfig, the SuSE Configuration Tool...
Running in full featured mode.
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.alljava...
Executing /sbin/conf.d/SuSEconfig.apache...

ATTENTION: You have modified /etc/httpd/httpd.conf.  Leaving it untouched...
You can find my version in /etc/httpd/httpd.conf.SuSEconfig...

Executing /sbin/conf.d/SuSEconfig.apache2...
Looking for multi-processing modules (MPM)...
  2 MPM installed (prefork worker)
  APACHE_MPM is unset (/etc/sysconfig/apache2), picked "prefork"
  create symbolic link `/usr/sbin/httpd2' to `/usr/sbin/httpd2-prefork'
Executing /sbin/conf.d/SuSEconfig.automake...
Executing /sbin/conf.d/SuSEconfig.fonts...
Creating cache files for Xft ......................
Configure X11 to use available CID-keyed fonts ...
Creating fonts.{scale,dir} files ...........
Executing /sbin/conf.d/SuSEconfig.ghostscript-cjk...
Executing /sbin/conf.d/SuSEconfig.gnome-print...
Executing /sbin/conf.d/SuSEconfig.gnome-vfs2...
Executing /sbin/conf.d/SuSEconfig.groff...
Executing /sbin/conf.d/SuSEconfig.gtk2...
Executing /sbin/conf.d/SuSEconfig.guile...
Executing /sbin/conf.d/SuSEconfig.isdn...
Modify isdn.conf
Executing /sbin/conf.d/SuSEconfig.kde...
Executing /sbin/conf.d/SuSEconfig.kdm3...
Executing /sbin/conf.d/SuSEconfig.libxml2...
Executing /sbin/conf.d/SuSEconfig.news...
Executing /sbin/conf.d/SuSEconfig.pango...
Executing /sbin/conf.d/SuSEconfig.perl...
Executing /sbin/conf.d/SuSEconfig.permissions...
Executing /sbin/conf.d/SuSEconfig.profiles...
Executing /sbin/conf.d/SuSEconfig.scpm...
Executing /sbin/conf.d/SuSEconfig.sgml-skel...
Executing /sbin/conf.d/SuSEconfig.sortpasswd...
Executing /sbin/conf.d/SuSEconfig.susehelp...
Executing /sbin/conf.d/SuSEconfig.xdm...
Finished.


Does this mean I need to update the differences in the two files?

ATTENTION: You have modified /etc/httpd/httpd.conf.  Leaving it untouched...
You can find my version in /etc/httpd/httpd.conf.SuSEconfig...

Also the only thing I could find when running the test .php file for rewrite was:

Is this correct?

Directive:         
url_rewriter.tags 
Local Value:
a=href,area=href,frame=src,input=src,form=,fieldset= 
Master Value:
a=href,area=href,frame=src,input=src,form=,fieldset=




Thanks for any suggestions

User avatar
Saka
Joomla! Explorer
Joomla! Explorer
Posts: 263
Joined: Sat Aug 13, 2005 2:13 am
Location: Sweden
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by Saka » Mon Mar 27, 2006 8:31 pm

compass wrote: Quote from Emir....
All current solutions (including my commercial one) are patches that require constant support work.

Until DB is structured in a more flexible way, use my core SEF (which is solid good and stable) or some 3rd party solution. There are tons of free ones, so what's your problem?
I don't reall y know much about the saga here, but....

"All current solutions (including my commercial one) are patches that require constant support work"
and
"use my core SEF (which is solid good and stable)"

Did he just imply that free 3rd party pnes are patchy but his commercial one is stable?
Can't you read? I said MY CORE SEF. Want me to translate that? That means SEF which is included in Joomla core which I happened to write. And it is solid stable. Where did you ever see words "commercial" or "3rd party". Gee.
Last edited by Saka on Mon Mar 27, 2006 8:34 pm, edited 1 time in total.

User avatar
compass
Joomla! Ace
Joomla! Ace
Posts: 1347
Joined: Fri Aug 26, 2005 1:31 am
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by compass » Mon Mar 27, 2006 10:46 pm

Ahhh, now I get it...

No need to get  >:(

;)
Follow me on Twitter @compassdesign
www.compassdesigns.net - Get get free templates and news for Joomla
simplweb.com/joomla-hosting - Fully Managed Joomla Hosting - Unlimited Support

rswennen
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Sun Dec 04, 2005 9:02 am

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by rswennen » Wed Apr 05, 2006 6:54 am

All, you guys obviously are the experts,
I would need some advice on this one (it is probably a very stupid question  :().

I am trying to get my components working with the standard SEO feature of Joomla.

My standard URL's look like:
http://www.mysite.com/index.php?option= ... ist&prod=G

I read in he development guidelines on joomla that you should allways use full URL's in Joomla so I am using sefRelToAbs and my component code looks like

$url = sefRelToAbs("index.php?option=com_nutrition&task=list&prod=G");

But this doesn't work with SEO, it is "translated" into:
http://www.mysite.com/component/option, ... st/&prod=G

So the first parameter task is interpreted well but the second "prod" is not.

If I use relative links everything works fine because the URL is not re-written:
so the code
$url = "index.php?option=com_nutrition&task=list&prod=G";
will remain as http://www.mysite.com/index.php?option= ... ist&prod=G

So I can easily fix the bug by using relative URL's but since this is against development recommendations of Joomla I would prefer to figure out why the absolute link is not working.

Can anyone help me on this one ?

Regards,

Rohnny

User avatar
compass
Joomla! Ace
Joomla! Ace
Posts: 1347
Joined: Fri Aug 26, 2005 1:31 am
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by compass » Wed Apr 05, 2006 1:37 pm

I read in he development guidelines on joomla that you should allways use full URL's in Joomla
I am not sure where it says that but I would be quite certain that the URL you gave won't be any problem for SEO
Follow me on Twitter @compassdesign
www.compassdesigns.net - Get get free templates and news for Joomla
simplweb.com/joomla-hosting - Fully Managed Joomla Hosting - Unlimited Support

rswennen
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Sun Dec 04, 2005 9:02 am

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by rswennen » Wed Apr 05, 2006 1:47 pm

Honestly they are for some reason.

The strange thing is the first parameter task is interpreted ok, but the second one is not.

Th problem is allways from the second variable onwards.

User avatar
lasor
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Fri Apr 07, 2006 11:33 pm
Contact:

A Little Help Please

Post by lasor » Tue Apr 11, 2006 6:14 pm

Sorry I posted in the wrong area....Its the frustration. :-[
Last edited by lasor on Tue Apr 11, 2006 6:19 pm, edited 1 time in total.

User avatar
normdouglas
Joomla! Hero
Joomla! Hero
Posts: 2654
Joined: Fri Jan 20, 2006 11:37 am
Location: Geelong Australia

Re: DISCUSSION: Search Engine Friendly URLs (SEF) The answer for WAMP users

Post by normdouglas » Sun Apr 16, 2006 1:52 pm

I just had to post this.  I have spent considerable time trying to get SEF working on my Windows 2003 server running WAMP5.  Might I ad at this point that WAMP is a killer app and I just love it, almost as much as I love Joomla.  So I just HAD to get sef working.
To get to the point here we go... Ready... this took me AGES to work out and I must give "Robert" from the WAMP forum the kudos for this.

WAMP comes configured with mod_rewrite turned OFF by default!

Got that?  So just go to your httpd.conf file, find this line "LoadModule rewrite_module modules/mod_rewrite.so" and UNCOMMENT it.

Then the world is a beautiful place.  I hope you can all hear my joy in this post, 'cause this has REALLY been pissing me off.

Thanks for this wonderful forum too, and thanks to all the Joomla Hero's for your valuable time.

Cheers
Step1. Read the instructions. Step2. Refer to step 1. Step 3. Backup

ramana
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Apr 17, 2006 4:54 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by ramana » Mon Apr 17, 2006 5:34 pm

Yesteday I installed Joomla on my apache server.

Today I enabled the Standard SEF that comes with Joomla, and modified the .htaccess accordingly. But after that, the categories and content urls are not working but the section url is alright.


http://www.domain.com/content/category/7/17/33/ - 404 error
MSG: Forbidden - You don't have permission to access /content/category/7/17/33/ on this server Apache/1.3.34 Server at domain.com Port 80

http://www.domain.com/content/view/28/34/ - 404 error
MSG: Forbidden - You don't have permission to access /content/view/28/34/ on this server Apache/1.3.34 Server at domain.com Port 80

http://www.domain.com/content/section/7/32/ - Works Perfectly


What could be the problem???

My .htaccess file
Options FollowSymLinks
RewriteEngine On

Redirect /google.html http://www.google.com

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/) index.php

Please help.

-Ramana

ramana
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Apr 17, 2006 4:54 pm

PLEASE HELP on SEF 404 Error

Post by ramana » Mon Apr 17, 2006 5:50 pm

See the above message please & try to help me

thank you
ramana

citrusb
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Apr 19, 2006 10:00 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by citrusb » Wed Apr 19, 2006 10:42 pm

I've read the whole topic and have seen that a lot of people have problems with SEF.
They're blaming the code inside Joomla but the SEF links work fine for me.

The solution to make it work is very easy, but you must be the owner of the apache server
to make the neccesary changes in your server configuration, or let your provider do it
for you!

Step 1)
Make sure mod_rewrite is running on your server. Check that the following line exists in httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so

Step 2)
This is the most important one to get valid url's and no error 404's!!!!
In your httpd.conf there's a directory section for your documentroot. Normally in most linux
apache releases the AllowOveride for the documentroot is set to None. This option controls
however what can be put in your .htaccess file or not. We change it as in following example:


    Options MultiViews Includes FollowSymLinks ExecCGI
    AllowOverride FileInfo Options
    Order allow,deny
    Allow from all


In my case Joomla is installed in the documentroot.

Step 3) Rename htaccess to .htaccess as mentioned by Saka.

Step 4) Restart apache (i.e. service httpd restart)

Step 5) Switch Search Engine Friendly URLs on Global Configuration > SEO

This made it work for me. Suc6 and happy Joomla'íng Bert.
Last edited by citrusb on Wed Apr 19, 2006 10:47 pm, edited 1 time in total.

kaitlyn
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Apr 03, 2006 4:39 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by kaitlyn » Tue May 09, 2006 10:15 pm

Thank you Websmurf - YOU DA MAN!  :-*

The only thing that worked, and I mean worked - was your solution found in this thread http://forum.joomla.org/index.php/topic,1094.0.html

I had ALL the settings but .htaccess STILL was not working (even though I do have mod_rewrite, Apache, etc...) but thanks to you, now my site is working right!

Thanks again, and hope it helps others too!

Kait
Last edited by kaitlyn on Tue May 09, 2006 11:42 pm, edited 1 time in total.

toon
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun May 28, 2006 7:28 pm

Static Content SEF not working

Post by toon » Sun May 28, 2006 7:32 pm

I've followed the directions for implementing SEF.  Everything seems to work okay, except for one thing.

When I try to access a "static page content" I get an error.  The error is as follows:


NOT ACCEPTABLE (error 406)
An appropriate representation of the requested resource /CMS/content/view/34/65/ could not be found on this server.



I've tried creating a few static pages and all of them are giving me the same errors.  Can anyone help me get this working?

User avatar
stampie
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Mon May 29, 2006 12:38 pm
Location: Hungary
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by stampie » Mon May 29, 2006 1:01 pm

I'm using Joomla 1.0.8 on a byethost server, and I followed the steps written above. I had to comment out the line Options FollowSymLinks, but the redirection worked even without it. A tried the google redirection, it worked.
Now if I'm turning on the SEF url-s in joomla, it works perfectly for every component, but it doesn't work for content items. If I click on a content link, it says, it's an error 500.

I'd be glad if someone could tell me a tip, what should I check. Thank you.

Stampie

User avatar
stampie
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Mon May 29, 2006 12:38 pm
Location: Hungary
Contact:

Re: Static Content SEF not working

Post by stampie » Thu Jun 01, 2006 5:12 pm

I've found an answer to my problem (error 500 when using the content component), a mambot caused the problem. The only way solving it was reinstalling Joomla! After the reinstall completed, I got a working page - even content and static content items were accessable by SEF URL's.
But meanwhile installing some other components, mambots and modules a similar error happened: now I can't access my static content items, I get an error 500.
toon wrote: I've followed the directions for implementing SEF.  Everything seems to work okay, except for one thing.

When I try to access a "static page content" I get an error.  The error is as follows:


NOT ACCEPTABLE (error 406)
An appropriate representation of the requested resource /CMS/content/view/34/65/ could not be found on this server.



I've tried creating a few static pages and all of them are giving me the same errors.  Can anyone help me get this working?

toon: I think, you should check your server with a blank installation (if you haven't done it before), only with the core components, modules and mambots, and after it you should install all the needed stuff and watching the URL's.

toon
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun May 28, 2006 7:28 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by toon » Thu Jun 01, 2006 6:31 pm

Stampie,

That is probably a good idea.  Not really one I want to do (the thought of starting over again and debugging it that way).  But a good one, none the less.  :)


Unless someone knows why my setup is doing this (had same problem), then I'll try that in a week or two (taking a break from computers).

Thanks Stampie.

toon
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun May 28, 2006 7:28 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by toon » Thu Jun 01, 2006 7:47 pm

I got the problem resolved.  If anyone ever has the same issue, you need to add the following to your .htaccess file:

SecFilterEngine Off


Found this after a Google search.  Luckily I won't have to install a fresh copy!


Thanks Stampie

rdavis101
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 187
Joined: Sat Nov 19, 2005 6:45 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by rdavis101 » Fri Jun 02, 2006 4:52 am

I would appreciate if someone would enter OPENSEF in the Extensions area. I'd like to compare it's ratings to other solutions. Believe it or not, I do actually look at the ratings and reviews.

Let the various solutions go head to head and the users will sort it all out, I am sure.

Thanks,

Roger

oceanflame
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sun Jun 04, 2006 10:07 pm
Location: www.oceanflame.com
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by oceanflame » Sun Jun 04, 2006 10:14 pm

Hi I have enabled SEF, and followed all of the guidelines.

My problem is as follows.

With sef off a link is for example
http://www.oceanflame.com/index.php?opt ... d&Itemid=2

With sef on the link becomes
http://plasma.dnsprotect.com/~oceanfla/ ... /Itemid,2/

This then generates 404 errors.

however if i edit the url in the address bar to:
http://www.oceanflame.com/component/opt ... /Itemid,2/

Then it works correctly. Can someone tell me how to stop the links from having dnsprotect instead of my domain?

Celadore
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Fri May 26, 2006 1:33 am

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by Celadore » Mon Jun 05, 2006 10:57 am

Tip if you install with Fantastico!

I use fantastico to in stall Joomla (v 1.0.8) - just because it makes life so easy  :-[

I followed all the steps and it didn't work!  :(

This was because the .htaccess file that get installed by fantastico is not the same as the one in the version you can download from Joomla!! (this may get corrected in the future - but for now it is wrong).

All you need to do then, is copy the htaccess.txt file from here, and replace the .htaccess file that gets installed by fantastico.



Still, I think that way that openSEF does it looks better, if I could just find it....

webgyrl
Joomla! Explorer
Joomla! Explorer
Posts: 440
Joined: Sun Jun 11, 2006 7:31 am
Location: Planet Earth Most of the Time

Fantastico Install of Joomla! - can't get SEF to work

Post by webgyrl » Fri Jun 16, 2006 7:52 am

Celadore wrote: Tip if you install with Fantastico!

I use fantastico to in stall Joomla (v 1.0.8) - just because it makes life so easy  :-[

I followed all the steps and it didn't work!  :(

This was because the .htaccess file that get installed by fantastico is not the same as the one in the version you can download from Joomla!! (this may get corrected in the future - but for now it is wrong).

All you need to do then, is copy the htaccess.txt file from here, and replace the .htaccess file that gets installed by fantastico.



Still, I think that way that openSEF does it looks better, if I could just find it....
Hello,

I am having trouble getting SEF to work. I installed Joomla! via Fantastico into the root folder (home/username/public_html)

At first I went into Global Configuration and selected SEF.
When I tried to access pages on my site I got: Not Found
The requested URL /content/category/3/7/25/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


So I unchecked SEF and my pages were fine, but not in SEF mode! I want SEF pages!

So then I found the SEF FAQ and read through it and did all the steps.
1) You must run Apache APACHE RUNNING
To check this go to administration > System > System Info. Server type should be listed next to Web Server. SEF will not run on IIS, so don't bother trying.

2) You must have mod_rewrite enabled MOD_REWRITE ENABLED
To check this go to administration > System > System Info. Click on PHP Information tab. Scroll down until you find Loaded Modules row. mod_rewrite should be listed here. If it's not ask your web host to activate mod_rewrite.

3) Your server must allow .htaccess override
To check this delete everything from your .htaccess file and write a simple command here, for example:
Code:

Redirect /google.html http://www.google.com

Now point your browser to http://www.yoursite.com/google.html
If it redirects you to Google.com then you are OK. BROWSER REDIRECTS TO GOOGLE.com
Question here: was I supposed to put back in the contents of the .htaccess file the way it was before I deleted it???
The .htaccess file had the following in it (but I left mine with the Google stuff  ??? ) :
##
# @version $Id: htaccess.txt 2368 2006-02-14 17:40:02Z stingrey $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
# Only use one of the two SEF sections that follow.  Lines that can be uncommented
# (and thus used) have only one #.  Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
# For Standard SEF, use the standard SEF section.  You can comment out
# all of the RewriteCond lines and reduce your server's load if you
# don't have directories in your root named 'component' or 'content'
#
# If you are using a 3rd Party SEF or the Core SEF solution
# uncomment all of the lines in the '3rd Party or Core SEF' section
#
#####################################################

#####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented.  If you are running your Joomla/Mambo from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line.  For example, if your Joomla/Mambo is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################


##  Can be commented out if causes errors, see notes above.
# Options FollowSymLinks

#
#  mod_rewrite in use

# RewriteEngine On


#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla/MamboDirectory (just / for root)

# RewriteBase /


########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section


########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section


4) Set $mosConfig_sef= "1" in configuration.php DID THIS
You can also activate SEF under Site > Global Configuration.

5) Rename htaccess.txt to .htaccess
This can be done with a FTP program. Note the dot in the beginning! Also note that you can't do this on windows, you must rename it directly on server.
OK here is where my process is weird: my htaccess file is always .htaccess. It never was htaccess.htm at any time. I am looking at the .htaccess file in the public_html folder where Joomla! is installed. Am I looking in the wrong folder? What have I done wrong?

If you can shed any light on this problem, I would appreciate it greatly.
Always learning...

User avatar
stampie
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Mon May 29, 2006 12:38 pm
Location: Hungary
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by stampie » Mon Jun 19, 2006 6:09 pm

Code: Select all

# RewriteEngine On
Are you sure, that this line has to be commented out? I'd try to delete the # character before that line. If that does'nt work, I don't have any other idea.

Stampie

hongkong
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 03, 2005 4:58 pm

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by hongkong » Tue Jun 20, 2006 5:49 pm

citrusb wrote: I've read the whole topic and have seen that a lot of people have problems with SEF.
They're blaming the code inside Joomla but the SEF links work fine for me.

The solution to make it work is very easy, but you must be the owner of the apache server
to make the neccesary changes in your server configuration, or let your provider do it
for you!

Step 1)
Make sure mod_rewrite is running on your server. Check that the following line exists in httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so

Step 2)
This is the most important one to get valid url's and no error 404's!!!!
In your httpd.conf there's a directory section for your documentroot. Normally in most linux
apache releases the AllowOveride for the documentroot is set to None. This option controls
however what can be put in your .htaccess file or not. We change it as in following example:


    Options MultiViews Includes FollowSymLinks ExecCGI
    AllowOverride FileInfo Options
    Order allow,deny
    Allow from all


In my case Joomla is installed in the documentroot.

Step 3) Rename htaccess to .htaccess as mentioned by Saka.

Step 4) Restart apache (i.e. service httpd restart)

Step 5) Switch Search Engine Friendly URLs on Global Configuration > SEO

This made it work for me. Suc6 and happy Joomla'íng Bert.
Want to share one information for user who are using suse 10 or 10.1 dist.
Your httpd-conf looks in line 148 -161 like this
............

    Options None
    AllowOverride None
    Order deny,allow
    Deny from all


# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them

    Order allow,deny
    Deny from all

        ..........
You can change all day long whatever you want it won't help. I was already thinking what are the poeple talking. The problem is in line  177 :
Include /etc/apache2/default-server.conf

Suse includes lots of stuff in the httpd-conf. and the default-server.conf is one of it.

So, open the defualt-server.conf in /etc/apache2/
look in line 11 and you will find something like this:
.............

    # Possible values for the Options directive are "None", "All",
# or any combination of:
#  Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs-2.2/mod/core.html#options
# for more information.
Options None
    # AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#  Options FileInfo AuthConfig Limit
AllowOverride None
    # Controls who can get stuff from this server.
Order allow,deny
Allow from all

      ................
delete that whole part and paste  citrub's solution (don't forget the right path  in !!! )


  Options MultiViews Includes FollowSymLinks ExecCGI
    AllowOverride FileInfo Options
    Order allow,deny
    Allow from all


worked fine for me..

draculinos
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Fri Jul 21, 2006 12:22 pm
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by draculinos » Tue Aug 15, 2006 3:34 pm

Sorry for asking but if someone have IIS he has to forget SEO?

What other options he have?

User avatar
stampie
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Mon May 29, 2006 12:38 pm
Location: Hungary
Contact:

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by stampie » Tue Aug 15, 2006 8:21 pm

In the first entry there was a link to another forum here at the server for ones who can't use mod_rewrite. The link is here:

http://forum.joomla.org/index.php/topic,1094.0.html

I've never tried it, but it may help.

Stampie

User avatar
crash777
Joomla! Explorer
Joomla! Explorer
Posts: 334
Joined: Sat Sep 03, 2005 1:56 am
Location: Upstate New York

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by crash777 » Wed Aug 16, 2006 2:39 am

Celadore wrote: Tip if you install with Fantastico!

I use fantastico to in stall Joomla (v 1.0.8) - just because it makes life so easy  :-[

I followed all the steps and it didn't work!  :(

This was because the .htaccess file that get installed by fantastico is not the same as the one in the version you can download from Joomla!! (this may get corrected in the future - but for now it is wrong).

All you need to do then, is copy the htaccess.txt file from here, and replace the .htaccess file that gets installed by fantastico.
From where? I have seen several iterations of the htaccess file.. which one is the best, most secure and most flexible?
Thanks!
Aaron

Geoff
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3173
Joined: Sun Apr 16, 2006 12:20 am
Location: 127.0.0.1

Re: DISCUSSION: Search Engine Friendly URLs (SEF)

Post by Geoff » Fri Aug 18, 2006 5:16 am

The default .htacces file should be fine. You will have to comment and/or uncomment some lines to make it work with your set up (3rd party SEF Component, some other lines).
For the secure part, this topic will show you what to put in your .htaccess file to make your site a bit more secure. [http://forum.joomla.org/index.php/topic,75376.0.html]
Every bit counts. :D
Backup, backup, backup!
The "Master" .htacess file by Nicholas http://snipt.net/nikosdion/the-master-htaccess


Locked

Return to “FAQ Discussion Board”