hi,
i have forum in this path
http://www.example.com/forum
download system ( i wrote it with cart using ajax) in this path
http://www.example.com/software
route:software
books library
http://www.example.com/books
route:books
and so on
let's begin
[First]
make forum in supdomain from cpanel
http://forum.example.com/
Document Root /public_html/forum
in config file insert this
done
[second]
edit file library/XenForo/router.php
after
add this
[third]
created new folder called software in /public_html/software
from cpanel create subdomain for this folder
http://software.example.com/
Document Root /public_html/software
inside software folder create index.php with this content
then copy your .htaccess to this folder
now when you open
http://software.example.com/
it will display http://forum.example.com/software but we get style (css & js ) not working because base dir
[fourth]
in PAGE_CONTAINER template change
and in boardUrl option put your new forum link
http://forum.example.com
or you can modify this from Listener Template by preg_replace in $contents
i have forum in this path
http://www.example.com/forum
download system ( i wrote it with cart using ajax) in this path
http://www.example.com/software
route:software
books library
http://www.example.com/books
route:books
and so on
let's begin
[First]
make forum in supdomain from cpanel
http://forum.example.com/
Document Root /public_html/forum
in config file insert this
PHP:
$config['cookie'] = array(
'prefix' => 'example_',
'path' => '/',
'domain' => '.example.com'
);
done
[second]
edit file library/XenForo/router.php
after
PHP:
$routePath = $this->getRoutePath($request);
add this
PHP:
if(defined('MY_INDEX'))
{
$routePath = MY_INDEX . '/' . $routePath;
}
[third]
created new folder called software in /public_html/software
from cpanel create subdomain for this folder
http://software.example.com/
Document Root /public_html/software
inside software folder create index.php with this content
PHP:
//path to xenforo index.php
$path = '/home/example/public_html/forum/index.php';
//constant we used it in listener
define('MY_INDEX', 'software');
include($path);
then copy your .htaccess to this folder
now when you open
http://software.example.com/
it will display http://forum.example.com/software but we get style (css & js ) not working because base dir
[fourth]
in PAGE_CONTAINER template change
HTML:
<base href="[COLOR=#ff0000]{$xenOptions.boardUrl}[/COLOR]" />
<script><xen:comment>/* Chrome bug and for Google cache */</xen:comment>
var _b = document.getElementsByTagName('base')[0], _bH = "{xen:jsescape [COLOR=#ff0000]{$xenOptions.boardUrl}[/COLOR]}";
if (_b && _b.href != _bH) _b.href = _bH;
</script>
and in boardUrl option put your new forum link
http://forum.example.com
or you can modify this from Listener Template by preg_replace in $contents