Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Aiheen aloitti: msolution - elokuu 05, 2006, 12:53:34 IP

Otsikko: SEF URI??? i am on Apache!
Kirjoitti: msolution - elokuu 05, 2006, 12:53:34 IP
Hi,
i have my site on an apache server, to say i also have joomla running on the same server, with SEF enabled, but installing smf, it says the feature cannot be enabled at this server.!!!

and i believe even if i get around the problem, i think i would still need a htaccess file, ... can anyone tell me what im missing?

Regards
M.
Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: H - elokuu 05, 2006, 01:10:32 IP
SMF stops SEO URLs if you are running php under CGI mode.

Sometimes these URLs will still work when running under CGI. To allow this you will need to edit code in querystring.php
Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: msolution - elokuu 07, 2006, 10:03:18 AP
Lainaus käyttäjältä: huwnet - elokuu 05, 2006, 01:10:32 IP
SMF stops SEO URLs if you are running php under CGI mode.

Sometimes these URLs will still work when running under CGI. To allow this you will need to edit code in querystring.php

- no idea if its CGI mode, just moved to a new server. [www.googlepayments.co.in]
- joomla running fine, so i believe this should too.
- can u gimme the line number, and what i should be editing it to?
- using SMF1.1 RC2

Regards
M

Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: H - elokuu 07, 2006, 10:20:36 AP
Lainaa- no idea if its CGI mode, just moved to a new server. [www.googlepayments.co.in]

I can check if you link me to a phpinfo :D

In querystring.php


// This should work even in 4.2.x, just not CGI without cgi.fix_pathinfo.
if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1) && $context['server']['is_apache'])
{
// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . ';)((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);
}
Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: msolution - elokuu 08, 2006, 09:15:24 AP
hey,
thanx it wrked, i did

(!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1)


to

(!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 0)

but can i not get index.php in the resultant code.
http://www.googlepayments.co.in/index.php/board,15.0.html
Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: H - elokuu 08, 2006, 09:17:40 AP
The easiest way is going to be to get your host to set cgi.fix_pathinfo in php.ini and then put the code back to how it was originally.

The modifications you used worked for me but I had a modified version of Apache which was causing problems
Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: msolution - elokuu 08, 2006, 09:37:16 AP
hmmm....what i have is  "phpsuexec mode", (dont ask me more on this)
my host gave this to me when i was having issues regarding my htaccess,
in this mode i can make a php.ini file and post it on the root, as opposed to the normal practice of an htaccess fix for server variables/ configs.

i made a php.ini and added:

cgi.fix_pathinfo=1

dosnt do anything!!!

or perhaps the format is wrong!???

Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: H - elokuu 08, 2006, 11:57:10 AP
Did you change the SMF code back to what it was originally?
Otsikko: Re: SEF URI??? i am on Apache!
Kirjoitti: msolution - elokuu 12, 2006, 07:02:32 AP
yep, i tried reverting to what it was, with the ini file, but it comes back  with a ?
index.php?,,,

also more importantly, is there any way i can get rid of the index.php in the url, perhaps make it more lke joomla!

Regards
M.