Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

SEF URI??? i am on Apache!

Aloittaja msolution, elokuu 05, 2006, 12:53:34 IP

« edellinen - seuraava »

msolution

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.

H

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
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

msolution

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


H

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);
}
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

msolution

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/ [nofollow]index.php/board,15.0.html

H

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
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

msolution

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!???


H

Did you change the SMF code back to what it was originally?
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

msolution

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.

Advertisement: