Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Uploading textpattern to subdirectory
I host more than 1 site in my web host, so ‘d like to keep my textpattern site within its own subdirectory (e.g.: acme.com/site). The main textpattern installation document does not cover that. I want it to work so that when once comes to acme.com, they’ll be in viewing pages as if they were in the root (e.g. acme.com/about-us), instead of in the subdirectory (e.g.: acme.com/site/about-us).
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Uploading textpattern to subdirectory
You could use rah_external and then use a simple script like this one to show your about-us article in your home page.
Note that your (home) index page should have a php extension for the script to work.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Uploading textpattern to subdirectory
Hmm. The last hosting provider I used was able to do this without any plugin. But, thanks anyway!
Living the Location-Independent Life: www.NuNomad.com
Offline
#4 2011-11-03 17:02:47
- lazlo
- Member
- Registered: 2004-02-24
- Posts: 110
Re: Uploading textpattern to subdirectory
Hmmm maybe I am not reading this right, but the standard install does this exactly.
What are your settings in config.php?
They should be something like this:
$txpcfg[‘txpath’] = ‘/home/foo/public_html/textpattern’;
the “textpattern” being the subdirectory of your install.
Is could go as deep as you want it.
$txpcfg[‘txpath’] = ‘/home/foo/public_html/textpattern_installs/textpattern1’;
The rest of the settings for image folders and the need to be set in advanced preferences.
To be clear:
$txpcfg[‘txpath’] = ‘/home/foo/public_html/textpattern’;
gives me this in my url: foo.com/about-us not foo.com/textpattern/about-us
Just do the following instructions in the reverse order: :)
http://textpattern.net/wiki/index.php?title=Moving_Installation_from_Subdirectory_to_Domain_Root_on_the_Same_Server
Last edited by lazlo (2011-11-03 17:03:36)
Offline
Re: Uploading textpattern to subdirectory
Do you remember how?
Unless I misunderstood your question. What you wish to do is have txp in a subdirectory and a txp article as the site’s home page.
edit. I did misunderstand. most hosts can do that. and Les has the answer:)
Last edited by colak (2011-11-03 17:05:24)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Uploading textpattern to subdirectory
This is what I have in my config.php file:
$txpcfg[‘txpath’] = ‘/public_html/site’;
$txpcfg[‘doc_root’] = ‘/public_html/site’;
“site” is the name of the folder the website is in.
Living the Location-Independent Life: www.NuNomad.com
Offline
#7 2011-11-04 00:05:27
- lazlo
- Member
- Registered: 2004-02-24
- Posts: 110
Re: Uploading textpattern to subdirectory
Maybe someone more knowledgable than I can help, but I don’t have:
$txpcfg[‘doc_root’] = ‘/public_html/site’;
in my config.php files at all. I checked a few of my installations and can’t see it as a default parameter.
It is my completely uneducated guess in the workings of PHP config that your problem is that this variable should not be there.
Test your site install without it.
Last edited by lazlo (2011-11-04 00:05:59)
Offline
#8 2011-11-07 20:41:33
- lazlo
- Member
- Registered: 2004-02-24
- Posts: 110
Re: Uploading textpattern to subdirectory
Hey Just checking in to see how you made out.
A quick note that I forgot was the changing of the the default path within the index.php. Depending on you set-up, but this is how I do it.
I duplicate index.php and move it to my root directory then edit the following line:
from: define(“txpath”, dirname(FILE).’/textpattern’);
to: define(“txpath”, dirname(FILE).’/YOURSUBDIRECTORY/textpattern’);
Offline
Re: Uploading textpattern to subdirectory
I found a work-around solution using a “.htaccess” file for redirection. See: http://www.webweaver.nu/html-tips/web-redirection.shtml for details.
In the .htaccess file, put this line of code for every page forward:
Redirect 301 /page-name http://www.acme.com/folder-name/page-name
Living the Location-Independent Life: www.NuNomad.com
Offline
Pages: 1