Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-20 23:54:50

simsim
Member
Registered: 2006-05-06
Posts: 70

Textpattern installation on sub-folders

Hello,

I’ve installed TXP on my html_public root directory so as to work directly. I’m using clean URLs, but now I have a problem where any other script installed on a sub-folder got processed by TXP’s .htaccess’s RewriteEngine. (Similar to this problem).

Can one install TXP on s sub-folder and set it to work as if it’s installed on root directory? For example can I installed it on /html_public/mysite/ & move index.php to /html_public/ ?

Last edited by simsim (2007-12-21 13:07:33)

Offline

#2 2007-12-21 05:37:23

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Textpattern installation on sub-folders

Simsim,

Textpattern’s default .htaccess file doesn’t re-write any references to existing folders or files — so your scripts should be untouched by it.

Have you modified your .htaccess file at all?


Steve

Offline

#3 2007-12-21 07:31:36

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: Textpattern installation on sub-folders

Here’s the full content of it:

DirectoryIndex index.php index.html
Options +FollowSymLinks
Options -Indexes
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]
	RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
AuthType Basic
AuthName "Restricted Area"
AuthUserFile "/relative/path/.htpasswds/public_html/passwd"

Last edited by simsim (2007-12-21 14:08:32)

Offline

#4 2007-12-21 11:51:33

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Textpattern installation on sub-folders

simsim wrote:

Can one install TXP on s sub-folder and set it to work as if it’s installed on root directory? For example can I installed it on /html_public/mysite/ & move index.php to /html_public/ ?

If you install TXP in /html_public/mysite/ then index.php should be in that directory as well, not in /public_html/.

Offline

#5 2007-12-21 13:31:01

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: Textpattern installation on sub-folders

I just need to be able to work with other scripts without interference from TXP’s .htaccess settings. Now since it’s in the main root, it seems to affect the whole domain.

Check the site .

For example I have a newsletter system that is installed under html_public/lists/, but when I type http://sawa.org.sd/lists I got TXP’s 404 error page!

Offline

#6 2007-12-21 13:49:22

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Textpattern installation on sub-folders

simsim,

Here’s what I use, the default .htaccess in SVN:

#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteRule ^(.*) index.php

	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

Can you see my feeds page?

Offline

#7 2007-12-21 14:20:50

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: Textpattern installation on sub-folders

Bert,

I see your feeds page. I’ve altered my .htaccess to look like yours and still no luck.

Actually I’m installing the TXP site directly on root and that’s why I think its .htaccess file is affecting all the folders & sub-folders.

Is there a way I could physically install teh TXP site on public_html/somefolder/ and use .htaccess to make every page in the format http://example.org/somefolder/section/article-name rewritten to http://example.org/section/article-name?

Offline

#8 2007-12-21 14:30:04

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Textpattern installation on sub-folders

although i don’t know whats going on with your setup, i think you’re trying to fix it the wrong way. textpattern and its packaged htaccess by default is set to ignore a directory if it actually exists (as seen in hcgtv’s example). if thats not the case for you then something else is wrong.

maybe this faq may help (looks like you’re trying to do some form of basic authorization as can be seen in your .htaccess)

more possible info here

Last edited by iblastoff (2007-12-21 14:33:46)

Offline

#9 2007-12-21 15:00:09

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: Textpattern installation on sub-folders

I’m not trying to do any authorization. That code in the .htaccess file maybe was added by TXP’s <txp:passord_protect /> functionality. I was just experimenting with it & now I’ve removed it. The existing .htacces file code is:

DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

    RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0

Last edited by simsim (2007-12-21 15:00:55)

Offline

#10 2007-12-21 17:16:13

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Textpattern installation on sub-folders

Try if changing

RewriteRule ^(.*) index.php

to

RewriteRule ^(.*) /index.php

helps.

Offline

#11 2007-12-21 17:40:52

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: Textpattern installation on sub-folders

It didn’t work, Els!

I noticed that accessing TXP’s own physical folders work fine. mysite.com/files & mysite.com/images are accessible as physical folders, but not mysite.com/lists & a 404 error page is processed!

Last edited by simsim (2007-12-21 17:41:32)

Offline

#12 2007-12-21 17:55:57

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Textpattern installation on sub-folders

Simsim,

sorry this is giving you trouble. Some questions for you…

  1. Is there another .htaccess file in the /lists/ directory?
  2. What is the index file for that directory? I mean would url/lists/ normally go to /url/lists/index.php or .what?

Just wondering if you need to extend the DirectoryIndex index.php index.html directive at the top of your .htaccess to include the index file for the list system you are running if it isn’t php or html.


Steve

Offline

Board footer

Powered by FluxBB