Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-15 17:22:16

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

TXP in a subdirectory ... am I silly?

I’m sorry to ask this but I couldn’t find anything in this forum, the FAQ or in TextBook:

for the first time since using it I want to install TXP in a subdirectory of a subdomain. I entered the correct path in the preferences tab and also included it in config.php. When I try to call an article I get an error: “No such section /name-of-subdir/”

I can view the home page alright and logging into the admin areas is fine as well.

I’ve tried to use rewrite base with /name-of-subdir/ but no success.

Any ideas? I’m sure, I’m probably overlooking something very obious.

Thanks.

Offline

#2 2005-11-15 20:36:01

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: TXP in a subdirectory ... am I silly?

What did you put as your site url?

Offline

#3 2005-11-15 20:39:53

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: TXP in a subdirectory ... am I silly?

subdomain.domain.com/subdir

Double-checked.

Offline

#4 2005-11-15 20:56:48

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: TXP in a subdirectory ... am I silly?

I found this.

Offline

#5 2005-11-15 21:13:07

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: TXP in a subdirectory ... am I silly?

No luck. Thanks, mary, for looking into this. I think I’m going to establish another subdomain for the site so that I can keep it in the root of the subdomain without the need for another subdirectory.

Offline

#6 2005-11-15 21:24:53

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: TXP in a subdirectory ... am I silly?

Well, it’s strange since I don’t get it to work even though I have another site with the exact same setup in a subdomain. The only difference is that the other site was upgraded from an earlier TXP version and this new one is a fresh install of 4.0.2.

It’s too late tonight, I’m going to look into it tomorrow. Thanks for your help anyway.

Offline

#7 2005-11-15 21:31:59

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: TXP in a subdirectory ... am I silly?

Can you post the diagnostics from the subdir install?


Alex

Offline

#8 2005-11-15 21:34:04

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: TXP in a subdirectory ... am I silly?

<code>
Textpattern version: 4.0.2 (r1076)
last_update: 2005-11-14 23:01:33/2005-11-14 22:57:06
Document root: /home/www/ww6199/html/advent
$path_to_site: /home/www/ww6199/html/advent
Textpattern path: /home/www/ww6199/html/advent/textpattern
Permanent link mode: section_title
open_basedir: /home/www/ww6199/
upload_tmp_dir: /home/www/ww6199/phptmp/
Temp folder: /home/www/ww6199/html/advent/textpattern/tmp
Site URL: advent.andreas-kalt.de
PHP version: 4.3.10
Register globals: 1
server_time: 2005-11-15 22:33:30
MySQL: 4.0.21-standard
Locale: C
Server: Apache/1.3.26 (Unix) Debian GNU/Linux FrontPage/5.0.2.2623 PHP/4.3.10 mod_ssl/2.8.10 OpenSSL/0.9.7
Apache version: Apache/1.3.26 (Unix) Debian GNU/Linux FrontPage/5.0.2.2623 PHP/4.3.10 mod_ssl/2.8.10 OpenSSL/0.9.7

Pre-flight check:
————————————
Your version of PHP has security related risks. Please turn register_globals off or update to a newer PHP version.
————————————
</code>

<code>

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^advent$ [NC]
RewriteRule ^(.*) advent/index.php
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]

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

#php_value register_globals 0

————————————
</code>

Last edited by andreas (2005-11-15 21:35:56)

Offline

#9 2005-11-15 21:56:04

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: TXP in a subdirectory ... am I silly?

That’s weird… I have an install in a subdirectory and it works correctly.

<code>Textpattern version: 4.0.1 (r888) last_update: 2005-09-13 05:29:53/2005-09-13 05:29:45 Document root: /home/paulasaur.us (/home/paulasaur.us) $path_to_site: /home/paulasaur.us/rex Textpattern path: /home/paulasaur.us/rex/textpattern Permanent link mode: section_title Temp folder: /home/paulasaur.us/rex/textpattern/tmp Site URL: paulasaur.us/rex PHP version: 4.3.10 Register globals: 1 Magic quotes: 1/0 MySQL: 4.1.14-Debian_3-log Locale: en_US.UTF-8 Server: Apache/1.3.33 (Unix) DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.3.10 mod_ssl/2.8.22 OpenSSL/0.9.7e

.htaccess file contents:
————————————
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]

RewriteCond %{THE_REQUEST} !/stats/
RewriteRule ^(.*) index.php

————————————
</code>

Last edited by paularms (2005-11-15 21:56:18)

Offline

#10 2005-11-15 21:59:10

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: TXP in a subdirectory ... am I silly?

I would bet, with my limited knowledge on using subdomains, that the problem is because the subdomain name (advent) and the name of folder where TXP is installed (also advent) are the same.

I have seen in some servers that when you want to use a subdomain (example: mysub.domain.com) you also need to have a /mysub/ folder in the root for the subdomain to work.

Or maybe the problem is here:

RewriteRule ^(.*) advent/index.php

Shouldn’t that be:

RewriteRule ^(.*) index.php

?

Last edited by maniqui (2005-11-15 22:02:44)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#11 2005-11-15 22:05:10

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: TXP in a subdirectory ... am I silly?

But if it was a server problem, why does TXP spit out a 404 error when I call the individual article?

If it was something with the server, I shouldn’t see anything at all, or should I?

I can access the root without problems.

Last edited by andreas (2005-11-15 22:05:30)

Offline

#12 2005-11-15 22:44:08

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: TXP in a subdirectory ... am I silly?

$path_to_site: /home/www/ww6199/html/advent
Textpattern path: /home/www/ww6199/html/advent/textpattern
Site URL: advent.andreas-kalt.de

This looks like it’s installed in the subdomain root, not a subdirectory of the subdomain.

RewriteCond %{HTTP_HOST} ^advent$ [NC]
RewriteRule ^(.*) advent/index.php

I’d guess this is the problem. The way most hosts handle subdomains in subdirectories causes some peculiarities with the way mod_rewrite and .htaccess works. Since the .htaccess file is in /home/www/ww6199/html/advent, it’s possibly trying to load /home/www/ww6199/html/advent/advent/index.php.

Try it without those extra lines.


Alex

Offline

Board footer

Powered by FluxBB