Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 9:44 am (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 Previous  1, 2, 3, 4, 5  Next
Author Message
Posted: Thu Sep 22, 2005 1:13 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 12:22 pm
Posts: 933
Location: Ballarat, Australia
eosguy wrote:
Kindly ignore my previous post. I managed to get a proper link after changing the category/link.


That works but this doesn't  :'(

_________________
We cannot become what we need to be ... by remaining what we are


Top
   
 
Posted: Wed Sep 28, 2005 4:09 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Sep 28, 2005 3:32 pm
Posts: 1
I just try it.

I still need to make  "  index.php? " instead of " index.php "  otherwise it does not work.

I do not know that new URL which still have " ? " is beter SEF than the old one or not ?

which one have a better SEF or both are equivalent ? Please kindly advise.

          1)  index.php?/content/view/6/2/

          2)  index.php?option=com_content&task=view&id=6&Itemid=2


Top
  E-mail  
 
Posted: Thu Sep 29, 2005 10:01 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
i think the first would be better.
Only one argument to care for in stead of 4

_________________
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: Sun Oct 02, 2005 1:24 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sun Oct 02, 2005 1:19 am
Posts: 2
Please, help me, the solution posted here, didn't work for me.

site: http://www.programad.com.br
MyMenu(horizontal menu, in template code)
server IIS

Can anyone help me?
First, when i enabled SEF and changed the line in sef.php mentioned by websmurf, the "trick" didn't work, then i tried to change again, and add the code give by websmurf, and didn't work again.
MyMenu is showing the links the old way (withoud slashses), it works fine, but when i access the menu "Serviços(Services)" and click on an item Eg. "Servidores Linux (Linux servers)" it show this link: http://www.programad.com.br/index.php?c ... iew/11/41/ and doesn't work! IIS returns to index.php but the link on the adressbar is http://www.programad.com.br/index.php?c ... iew/11/41/

Can anyone help?

Thanks.

Well, i tried to chang from
return $mosConfig_live_site."/index.php?".$string;
to
return $mosConfig_live_site."/index.php/".$string;
and now the IIS returns page not found


Last edited by programad on Sun Oct 02, 2005 1:39 am, edited 1 time in total.

Top
   
 
Posted: Mon Oct 03, 2005 5:11 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Sep 18, 2005 7:45 pm
Posts: 73
Location: Croatia
It does not work for me... :(

Websmurf wrote:
3. open /includes/sef.php and change this line: (~ line 217)


Acctually in my sef.php "return $mosConfig_live_site."/".$string;" is in line 266

_________________
Neotronic.net


Top
  E-mail  
 
Posted: Wed Oct 05, 2005 7:08 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Oct 05, 2005 3:30 am
Posts: 4
programad wrote:
Please, help me, the solution posted here, didn't work for me.

site: http://www.programad.com.br
MyMenu(horizontal menu, in template code)
server IIS

Can anyone help me?
First, when i enabled SEF and changed the line in sef.php mentioned by websmurf, the "trick" didn't work, then i tried to change again, and add the code give by websmurf, and didn't work again.
MyMenu is showing the links the old way (withoud slashses), it works fine, but when i access the menu "Serviços(Services)" and click on an item Eg. "Servidores Linux (Linux servers)" it show this link: http://www.programad.com.br/index.php?c ... iew/11/41/ and doesn't work! IIS returns to index.php but the link on the adressbar is http://www.programad.com.br/index.php?c ... iew/11/41/

Can anyone help?

Thanks.

Well, i tried to chang from
return $mosConfig_live_site."/index.php?".$string;
to
return $mosConfig_live_site."/index.php/".$string;
and now the IIS returns page not found


The same thing happened to me. I am on an IIS server as well.

Do you have to run the convert function for every link ?


MM.


Top
   
 
Posted: Wed Oct 05, 2005 8:36 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sun Oct 02, 2005 1:19 am
Posts: 2
No, i don't need to convert, the SEF function, do it itself


Top
   
 
Posted: Fri Oct 07, 2005 3:54 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Aug 30, 2005 2:29 pm
Posts: 28
For IIS, you have to set the return string to be

return $mosConfig_live_site."index.php?/".$string;

If that doesn't work (you get http://www.mydomain.comindex.php?/component...) then set it to be

return $mosConfig_live_site."/index.php?/".$string;

You can see this method in action at http://www.sendosmartphones.com


Top
  E-mail  
 
Posted: Fri Oct 07, 2005 4:51 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Oct 07, 2005 4:45 pm
Posts: 64
Websmurf wrote:
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) {
)


Hello,

I tried using the workaround above and could not get it to work. I am trying to add this last part as posted about adding the codes above in the sef.php file but can't figure out exactly where to put it. Can anyone provide more information?

Thanks.


RedBox


Top
  E-mail  
 
Posted: Fri Oct 07, 2005 6:23 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Oct 07, 2005 4:45 pm
Posts: 64
RedBox wrote:
Websmurf wrote:
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) {
)


Hello,

I tried using the workaround above and could not get it to work. I am trying to add this last part as posted about adding the codes above in the sef.php file but can't figure out exactly where to put it. Can anyone provide more information?

Thanks.


RedBox


Okay, got it!!  :) Looks like I did not have to add the codes above anyway. After looking at 'stuclark' post, the lines to change to (in my case, I'm using IIS) is actually

return $mosConfig_live_site."/index.php?/".$string;

instead of:

return $mosConfig_live_site."index.php?".$string;

as posted initially.

Thanks!!


RedBox


Top
  E-mail  
 
Posted: Sat Oct 08, 2005 12:02 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Oct 05, 2005 3:30 am
Posts: 4
Quote:

Okay, got it!!  :) Looks like I did not have to add the codes above anyway. After looking at 'stuclark' post, the lines to change to (in my case, I'm using IIS) is actually

return $mosConfig_live_site."/index.php?/".$string;

instead of:

return $mosConfig_live_site."index.php?".$string;

as posted initially.

Thanks!!


RedBox




This worked for me too!


Top
   
 
Posted: Sat Oct 08, 2005 8:31 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Sep 18, 2005 7:45 pm
Posts: 73
Location: Croatia
stuclark wrote:
For IIS, you have to set the return string to be

return $mosConfig_live_site."index.php?/".$string;

If that doesn't work (you get http://www.mydomain.comindex.php?/component...) then set it to be

return $mosConfig_live_site."/index.php?/".$string;

You can see this method in action at http://www.sendosmartphones.com


Again, it does not work for me... with or without adding the codes in the sef.php file

_________________
Neotronic.net


Top
  E-mail  
 
Posted: Sat Oct 08, 2005 8:15 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Oct 07, 2005 4:45 pm
Posts: 64
RedBox wrote:
RedBox wrote:
Websmurf wrote:
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) {
)


Hello,

I tried using the workaround above and could not get it to work. I am trying to add this last part as posted about adding the codes above in the sef.php file but can't figure out exactly where to put it. Can anyone provide more information?

Thanks.


RedBox


Okay, got it!!  :) Looks like I did not have to add the codes above anyway. After looking at 'stuclark' post, the lines to change to (in my case, I'm using IIS) is actually

return $mosConfig_live_site."/index.php?/".$string;

instead of:

return $mosConfig_live_site."index.php?".$string;

as posted initially.

Thanks!!


RedBox




Well I think I spoke too soon. After changing to the above, the links did change to the SEF format. However, now when I click on any links, it doesn't go anywhere. It just goes back to displaying the same home default page. I want to try adding the codes above, can anyone give more details where in the file to add that to?

Thanks.


RedBox


Top
  E-mail  
 
Posted: Mon Oct 10, 2005 3:25 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Oct 01, 2005 2:09 pm
Posts: 9
wow thanks for the tip!

_________________
so little time, got so many things to learn....


Top
  E-mail  
 
Posted: Wed Oct 12, 2005 5:38 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Oct 10, 2005 6:07 pm
Posts: 7
Websmurf wrote:
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.tim-online.nl/index.php/content/view/9/34/
http://www.tim-online.nl/index.php/content/view/10/35/
http://www.tim-online.nl/index.php/component/option,com_docman/Itemid,78/

check www.tim-online.nl for an example..





I have done with your method, but...does not work. all other pages jump to the index page. when I

changed
return $mosConfig_live_site."/index.php?".$string;
to
return $mosConfig_live_site."/index.php?/".$string;

everything is OK! I don't know the reason, it really works fine! :D


Top
   
 
Posted: Wed Nov 16, 2005 12:02 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 13, 2005 2:13 am
Posts: 223
Location: Sweden
This has been integrated in Joomla 1.1 now.
As SEF is now converted to system mambot you will find the switch in mambot's parameters.

_________________
Emir Sakic
http://www.sakic.net


Top
  E-mail  
 
Posted: Mon Nov 21, 2005 9:19 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Fri Aug 19, 2005 2:23 pm
Posts: 2158
Location: The Netherlands
Nice to hear that Emir

_________________
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: Fri Dec 02, 2005 11:26 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Nov 25, 2005 9:56 am
Posts: 14
Hi,

none of the above tricks worked for me, but I experimented a little with different combinations and found the following solution:

My (free) provider does not allow mod_rewrite, but I can define my own 404 page which has to be named "404.php".  So I did the following:
  • In the global configuration menu I turned on the option "Search Engine Friendly URLs"
  • I copied the index.php to 404.php
That's all. It looks ok and it seems to work. You can check it out at http://www.gefeuert.tk. Hopefully there won't be any side effects. Maybe this is useful for some of you.

_________________
http://gefeuert.tk


Top
  E-mail  
 
Posted: Sat Dec 03, 2005 3:49 am 
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 9:06 am
Posts: 1465
gefeuert wrote:
I copied the index.php to 404.php

Having a file 404.php which contains the following code may give you more fun when upgrading your installation:
Code:
<?php include('index.php'); ?>

_________________
http://de.siteof.de/


Top
   
 
Posted: Sat Dec 03, 2005 11:27 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Nov 25, 2005 9:56 am
Posts: 14
That's  much better! Thx!

Hm, maybe there's a problem: The google ads are no longer displayed on the content pages when I turn SEF on. Or is this jus a coincidence?

_________________
http://gefeuert.tk


Last edited by gefeuert on Sat Dec 03, 2005 2:31 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Wed Jan 25, 2006 9:25 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Oct 07, 2005 4:45 pm
Posts: 64
Saka wrote:
This has been integrated in Joomla 1.1 now.
As SEF is now converted to system mambot you will find the switch in mambot's parameters.


When you say integrated, will it also work on Windows IIS?

Thanks.


RedBox


Top
  E-mail  
 
Posted: Fri Jan 27, 2006 6:43 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Oct 07, 2005 4:45 pm
Posts: 64
Well does anyone know? Will it be something internal to Joomla that you can activate and have all links be friendlier/more intuitive or will this be dependent on Apache and mod rewrite or something like that? I think a percentage of Joomla users run it on Windows IIS so can a project team member comment on this?

Thanks.


RedBox


Top
  E-mail  
 
Posted: Sat Feb 11, 2006 6:15 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jan 17, 2006 8:02 am
Posts: 15
This thread got me out of a 2 week bind - so thanks very much!

To return the kindness, here is a very simple solution to adding categories, sections, product names, your pets names, and whatever else you want - to your SEF urls ... I could have queried the database and automatically filled in category, section_id, etc but this example keeps it simple.

In    includes\sef.php

Right before ... " if ($mosConfig_sef) { "

Add as many of these lines as you like.. I have replaced the standard SEF URL for "Contact Us" as a simple example that should work immediately for everyone...

$_SERVER['REQUEST_URI'] = str_replace( "Contact_Us", "component/option,com_contact/Itemid,3",$_SERVER['REQUEST_URI']) ;

and then down near the end of the file,

$string = str_replace( "component/option,com_contact/Itemid,3","Contact_Us",$string) ;

immediately before :

return $mosConfig_live_site."/index.php/".$string;  (note that I've incorporated websmurf's hack - soon to be implemented in 1.1)

The URL looks as follows:

http://www.yourwebsite.com/index.php/Contact_Us/

If you are wondering how I knew what to place in the "Contact_Us" string, I just clicked on "Contact Us" in the main menu and copy and pasted it here. So simple its gross and when I have more time, I can pull Category Names, Section Names, Products, etc from the database so it all works automatically.

If you don't want to have "index.php" in your url, just do what  DE  suggested above and add the following line into your .htaccess:

ErrorDocument 404 /index.php      -  now your URL is simply    http://www.yourwebsite.com/Contact_Us/

Now you can replace gobbley-gook URLs with very friendly human language for any link on your site.

Thanks again Websmurf - couldn't have done it without you.    (Why do I get the impression from these forums that no-one wants this solution found ? - Think I'll flip on "conspiracy theory" tonight, X-files?, ...)

Bon nuit et bon chance!

Ed


Top
   
 
Posted: Sat Feb 11, 2006 6:29 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
etilley wrote:
Thanks again Websmurf - couldn't have done it without you.    (Why do I get the impression from these forums that no-one wants this solution found ? - Think I'll flip on "conspiracy theory" tonight, X-files?, ...)

Dont know why you would get that impression - as it happens SEF in 1.1 will support the ability to run without mod_rewrite - by simply changing the param for the new SEFBot.

_________________
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: Sat Feb 11, 2006 6:31 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
Should also note in Joomla! 1.0.x if you look in SEF.php you will specifically see this line:

Taken from Joomla 1.0.7
Code:
      // comment line below if you dont have mod_rewrite
      return $mosConfig_live_site.'/'.$string;

      // allows SEF without mod_rewrite
      // uncomment Line 348 and comment out Line 354   
   
      // comment out line below if you dont have mod_rewrite
      //return $mosConfig_live_site.'/index.php/'.$string;

_________________
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 Feb 13, 2006 11:46 pm 
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 2:39 am
Posts: 1035
stingrey wrote:
Should also note in Joomla! 1.0.x if you look in SEF.php you will specifically see this line:

Taken from Joomla 1.0.7
Code:
      
   
      // comment out line below if you dont have mod_rewrite
      //return $mosConfig_live_site.'/index.php/'.$string;



That should read // uncomment line below if you do not have mod_rewrite
or remove comment.

_________________
Freedom is not free!
It is however Open Source.


Top
   
 
Posted: Tue Feb 14, 2006 9:16 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
camos wrote:
That should read // uncomment line below if you do not have mod_rewrite
or remove comment.

Oops thanks

_________________
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: Thu Feb 16, 2006 1:02 am 
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 2:39 am
Posts: 1035
I applied this solution to a site running on my IIS server and it seems to work well except for menu links to any component.  Click in the link and you get kicked back to the frontpage.  There have been a couple of remarks about components here but they appear to have gone over my head.

Using the /index.php?/ variant.

Have I perhaps done something wrong or is there something extra to do to get the component links working?

Cheers

_________________
Freedom is not free!
It is however Open Source.


Top
   
 
Posted: Thu Feb 16, 2006 10:48 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
camos wrote:
Using the /index.php?/ variant.

Have I perhaps done something wrong or is there something extra to do to get the component links working?

What do the links look like?
Can you post them?
Are they correctly being SEF'd?

_________________
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: Thu Feb 16, 2006 10:47 pm 
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 2:39 am
Posts: 1035
I'm just a Windows guy so properly SEFed is out of my domain. ;)

All links to components don't work and look like this:
http://mydomain.com/index.php?/option,c ... Itemid,86/
http://mydomain.com/index.php?/option,c ... /Itemid,4/

All links to sections, categories and content do work and look like this:
http://mydomain.com/index.php?/content/section/2/25/
http://mydomain.com/index.php?/content/ ... y/2/76/44/
http://mydomain.com/index.php?/content/view/182/57/

Cheers

_________________
Freedom is not free!
It is however Open Source.


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

Quick reply

 



Who is online

Users browsing this forum: freesadek, nrozas 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