Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 2:58 pm (All times are UTC )

 


Forum rules

Global Rules
Additional Rules for this forum <------- Please read before posting



Post new topic Reply to topic  [ 127 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
Posted: Tue Aug 23, 2005 9:03 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
In continuation of the topic on the former forum:

i think i've found a rather simple way to avoid the mod_rewrite ability in order to use SEF urls

Apache
1. Enable SEF in mambo configuration
2. do NOT rename the htaccess.txt
3. open /includes/sef.php and change this line: (~ line 217)
return $mosConfig_live_site."/".$string;
to
return $mosConfig_live_site."/index.php/".$string;

For this to work, you will have to make sure AccepPathInfo is set to on in the apache configuration.

IIS
for IIS or if you can't get the above working use :
return $mosConfig_live_site."/index.php?".$string;

it could also be needed to add this to your sef.php
Code:
$_SERVER['REQUEST_URI'] = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME']);

// Append the query string if it exists and isn't null
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
  $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}

(just above this line
if ($mosConfig_sef) {
)

this will enable SEF urls to work without mod_rewrite at all..
and create urls like this:
http://www.site.ext/index.php/content/view/9/34/
http://www.site.ext/index.php/content/view/10/35/
http://www.site.ext/index.php/component ... Itemid,78/

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Last edited by Websmurf on Wed Aug 15, 2007 2:00 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Tue Aug 23, 2005 9:11 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Aug 19, 2005 9:45 am
Posts: 88
Interesting idea.

To explain a little how this works for the uninitiated. Normal sef urls need .htaccess which looks at the url, says ooh eh that does not really exists, and uses mod_rewrite to pass the url on to index.php.

This tweak means the url does actually exist as it has index.php already.

e.g.

http://www.tim-online.nl/index.php/content/view/9/34/

as opposed:

http://www.tim-online.nl/content/view/9/34/


hence it does not need mod_rewrite.

That being said, will search engines look and rank beyond the index.php in the url?


Top
   
 
Posted: Tue Aug 23, 2005 11:09 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
yes actually.

Our main page has pagerank 7
"Over Tim" has pagerank 5
Forum has pagerank 5

Etc

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Tue Aug 23, 2005 12:27 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 10:46 am
Posts: 2134
Location: Rome Italy
Sorry for my ignorance,

my silly question is this:

for make component adhere the SEF specification  what i have to do in the code ?

_________________
www.alikonweb.it
www.joomladdons.eu


Top
   
 
Posted: Tue Aug 23, 2005 12:39 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
do you mean making sef links in a component?

Code:
echo sefRelToAbs('index.php?option=com_mycomp&act=myact&task=mytask&Itemid=111');


or am i misunderstanding you?

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Tue Aug 23, 2005 12:47 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 10:46 am
Posts: 2134
Location: Rome Italy
yes, right,

another little question , we have to use sefRelToAbs() for any redirection such as form hyperlink tag and so on ...

_________________
www.alikonweb.it
www.joomladdons.eu


Top
   
 
Posted: Tue Aug 23, 2005 12:53 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
any link users can click, can be spidered by search engines, so it would be wise to do that.
I don't think form tags etc would be usefull. Also popups (via index2.php) won't have to run through sefRelToAbs.

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Tue Aug 23, 2005 12:56 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Aug 19, 2005 9:45 am
Posts: 88
Websmurf wrote:
yes actually.

Our main page has pagerank 7
"Over Tim" has pagerank 5
Forum has pagerank 5

Etc


To play devils advocate. Uless you can measure what would happen to page rank with and without SEF, it is only guessing.


Top
   
 
Posted: Tue Aug 23, 2005 1:06 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
very true, but pages get picked up.
i don't think it will make a difference. SEF friendly pages are just easier to index for google.

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Tue Aug 23, 2005 1:12 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Aug 19, 2005 9:45 am
Posts: 88
Websmurf wrote:
very true, but pages get picked up.
i don't think it will make a difference. SEF friendly pages are just easier to index for google.


My understanding was that google was better than other search engines at reading non sef pages. Some search engines don't index paramaterised links. hence basic SEF like what we have here, made little difference on the google ranks but more difference with other engine.
For google you really need the "advanced" solutions. My downsizer site does very well with google and I put some of that down to SEF advance. The advanced solutions put keywords in the urls which does help rank.


Top
   
 
Posted: Tue Aug 23, 2005 1:21 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
Quote:
My understanding was that google was better than other search engines at reading non sef pages. Some search engines don't index paramaterised links.

that's another thing that's true :)

yes, SEF advanced is something i will definately buy for future sites. Works very nice and isn't that expensive at all.

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Wed Aug 24, 2005 8:26 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 24, 2005 2:02 pm
Posts: 276
Location: Rhode Island, USA
Happy to see this thread recesuitated.  This hack was a lifesaver, well, until we migrated to an Apache server with mod_rewrite.  Thanks again websmurf.


Top
   
 
Posted: Wed Aug 24, 2005 8:46 pm 
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 9:06 am
Posts: 1465
I thought I throw in another possibility which should work with Apache interpreting the .htaccess file (but without mod_rewrite):
Create the file .htaccess and make the following the only line:
Code:
ErrorDocument 404 /index.php

Then if you are using 404 SEF no further action should be required... for others which probably not set the status code you may want to add the following to your index.php (next to the other header function calls you will find around line 200):
Code:
header('HTTP/1.0 200 OK');


(this is describes the replacement for the renaming of the htaccess.txt... all other steps will remain the same... like enabling SEF or optionally installing an addition SEF component)

_________________
http://de.siteof.de/


Top
   
 
Posted: Fri Aug 26, 2005 1:10 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 11:07 pm
Posts: 349
websmurf--

Thanks for you help getting SEF working on IIS


:)

_________________
Joomla! Template Shop www.joomlathemes.org

Joomla Template Club
[URL=http://templateclub.mambosolutions.com]templateclub.mambosolutions.com
[/URL]


Top
  E-mail  
 
Posted: Fri Aug 26, 2005 1:34 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
not a problem :)

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Sat Aug 27, 2005 1:57 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Aug 18, 2005 7:13 pm
Posts: 16
Location: France
Websmurf wrote:


would it be possible to achieve something like:
http://www.mysite.com/index.php/section ... Alias.html ?

i mean the only difference with a mod_rewrite enabled SEF facility would be the "index.php" inserted but the end of the url would look the same

thx for any hint
Gregory


Top
  E-mail  
 
Posted: Sun Aug 28, 2005 3:00 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 12:57 pm
Posts: 2039
Location: Skanderborg, Denmark
Thax, just what i needed.

_________________
// Simon Milling Mikkelsen

Husk!: Google, og forummets søgefunktion er din ven!


Top
  E-mail  
 
Posted: Mon Aug 29, 2005 7:52 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
Guardian wrote:
Websmurf wrote:


would it be possible to achieve something like:
http://www.mysite.com/index.php/section ... Alias.html ?

i mean the only difference with a mod_rewrite enabled SEF facility would be the "index.php" inserted but the end of the url would look the same

thx for any hint
Gregory



Yes, With the open source solutions, there should be a simular line in the files (components/com_sef/sef.php)

If you want to use sef advanced, you'll have to ask Emir to make the modification

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Mon Aug 29, 2005 8:02 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Aug 18, 2005 7:13 pm
Posts: 16
Location: France
I tried 404SEF on another web account that has mod_rewrite enabled and it worked just fine.

I hope I'll succeed in using it without mod_rewrite performing the modification you described.

Gregory


Top
  E-mail  
 
Posted: Tue Aug 30, 2005 8:44 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Aug 30, 2005 2:29 pm
Posts: 28
I've just been playing with this on my IIS server - it turns out that (so long as you've got index.php selected as a default document in IIS) you don't even need the index.php in the SEF'd URL.

However, you DO need the ? and I have found that you also need a trailing /

So, the complete URL produced would be http://www.domain.com/?/content/view/1/2/

This can be seen in action at http://www.sendosmartphones.com

Now my question is - would a search engine prefer .../?/... or .../index.php?/...


Top
  E-mail  
 
Posted: Wed Aug 31, 2005 7:30 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
I don't know.

My preference would be /index.php?/

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Top
  E-mail  
 
Posted: Wed Aug 31, 2005 8:37 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Aug 30, 2005 2:29 pm
Posts: 28
Having played with this a little more - you need to use index?/ as otherwise things like SMF can't link to themselves properly.

Front-end editing is also borked - sef.php doesn't correctly identify those links as already having a /index.php? statement, so adds another. This results in broken URLs which look like .../index.php?/index.php?component=...

Seeing as sef breaks when I add the first few lines into sef.php - can anyone think of a way around this on IIS?


Top
  E-mail  
 
Posted: Fri Sep 02, 2005 1:35 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Aug 22, 2005 4:28 am
Posts: 7
Location: Malaysia
Hi... I've done exactly what was detailed here, and the SEF worked on all pages except on 'projects' on my site: http://www.motion-ds.com/design/index.php

Any ideas why? Thanks for looking.


I'm not sure if it's appropriate to ask this question here - how do I improve my page ranking besides using SEF? My site is basically running 3 different site scripts, Mambo/Joomla!, phpBB and Gallery. So far keyword search in Altavista returned good results, while Google and Yahoo! returns nothing at all. :(


Last edited by eosguy on Sat Sep 03, 2005 7:31 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Sun Sep 04, 2005 5:19 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Aug 22, 2005 4:28 am
Posts: 7
Location: Malaysia
Kindly ignore my previous post. I managed to get a proper link after changing the category/link.


Top
  E-mail  
 
Posted: Mon Sep 19, 2005 7:49 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Sep 13, 2005 8:39 am
Posts: 18
Hmm, great help, works for my main site, but maybe this is just me doing it wrong, I have an addon domain.. Anyway when trying to do it for the addon domain, I click on the link to my static content, and it goes there, but it just shows the homepage content.. Wierd, I'll add a seperate account for it and try, but yeh, a bit wierd.


Top
   
 
Posted: Mon Sep 19, 2005 12:19 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
Only stumbled upon this page now.


Very interesting to say the least

_________________
God grant me the Serenity to Accept the things I cannot change, the Courage to change the things I can and the Wisdom to know the Difference.


Top
  E-mail  
 
Posted: Mon Sep 19, 2005 2:23 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Mon Sep 05, 2005 6:18 am
Posts: 725
Location: India
I had put in the wish list i guess you missed it ...... maybe we can have a inbuilt option for the windows users usign IIS
stingrey wrote:
Very interesting to say the least

_________________
A. N. Jacob-New
The Tech & Design Blog http://www.Clazh.com


Top
   
 
Posted: Mon Sep 19, 2005 2:26 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
stingrey wrote:
Only stumbled upon this page now.


Very interesting to say the least

it's been around for a while though :P

You could build it into mambo very easily. Some sort of mod_rewrite/basic check

_________________
Adam van Dongen - Developer

- Blocklist, ODT Indexer, EasyFAQ, Easy Guestbook, Easy Gallery, YaNC & Redirect -
http://www.joomla-addons.org - http://www.bandhosting.nl


Last edited by Websmurf on Mon Sep 19, 2005 2:28 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Mon Sep 19, 2005 2:36 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
Websmurf wrote:
You could build it into mambo very easily. Some sort of mod_rewrite/basic check

Yes it does raise some interesting possibilities

_________________
God grant me the Serenity to Accept the things I cannot change, the Courage to change the things I can and the Wisdom to know the Difference.


Top
  E-mail  
 
Posted: Tue Sep 20, 2005 5:14 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Sep 17, 2005 10:04 pm
Posts: 19
I just tried this on my website running on IIS, works great!

Thx,

Thiago

_________________
There are only two kinds of people in the end: those who say to God, 'Thy will be done,' and those to whom God says, in the end, 'Thy will be done.' C. S. Lewis


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 127 posts ]  Go to page 1, 2, 3, 4, 5  Next

Quick reply

 



Who is online

Users browsing this forum: algis, heehaw49, lexxus and 31 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 © 2000, 2002, 2005, 2007 phpBB Group