Forum url different than absolute path of index.php

Started by fugiFox, December 14, 2005, 05:11:55 PM

Previous topic - Next topic

fugiFox

I have a folder 'smf' witch contains the index.php file and all the rest forum obviously.
I want forum to be loaded from a url like
www.myrl.com
and not www.myurl.com/smf

Is it possible and how? By moving index.php outside smf folder?

Thnx

Bigguy

Then you need to move everything out of your forum folder "smf" and put it in your root folder. then upload "repair_settings.php" and run that in your browser to change all the paths to the new ones. Or I guess you could make a file that redirects the user from www.myurl.com to www.myurl.com/smf and put that in your root folder.

Thantos

<?php
  
require_once("smf/index.php")
?>


Make that your www.myrl.com index.php

Then open the QueryString.php in the Sources directory
Find:
$scripturl = $boardurl . '/index.php';
and replace it with
$scripturl = $boardurl . '/../index.php';

Bigguy

Yep thats what I was talkin about, what MikeMill said.

fugiFox

result:

Fatal error: template_main_above(): Failed opening required 'SSI.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/thmmygr/public_html/smf/Sources/Load.php(1598) : eval()'d code on line 56

Thantos

Ok you said nothing about needing to use SSI.php :)

where are you using the require("SSI.php")?
You probably just need to change it to require("smf/SSI.php");

fugiFox

result:
A blank page :(

OK let me say exactly what i did.

put to the root folder the custom index.php with the require_once

change the 'forum url' to myurl.com

what is going wrong?


Thantos

The two changes I described above work on my test board.  Try testing it with the default template with no theme modifications or usages of SSI.php.  Provided everything else works properly there is no reason why it shouldn't work.

fugiFox

firstly thnx for ur time.

Even if it'll work for the default theme I want it for other themes also.

PS: What's the usage of SSI? Lots of jargon here, got confused.

Maybe the solution is sth between require(SSI) and require(index.php)?

fugiFox

and the weird thing is that i've changed the forum url to myulr.com
and although the inex.php located in smf folder contains the line $scripturl = $boardurl . '/../index.php';
it works when I type myurl.com/smf  ::)

Advertisement: