Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-07 10:33:51

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Weird issue with clean urls

Hi guys,
I have been mesing with this since last night and I can’t seem to get to the bottom of it – since I know practically nothing about server-side stuff.

The problem is that a client has a hosting package at a local hosting company (awfull stuff), and we are using that account to develop a development version of the site, in a separate directory, since he wanted the old static site to be visible during the development of the new TXP basd one. Now the directory structure is pretty weird if you ask me (the absolute dir paths), but everything seems to work OK, that is untill I type the full address: http://belgrade.cc/bgd2_0/index.php, and if I ommit the index.php it outputs the static index.html from the root dir. Understandably – because of this I can’t move from the /bgd2_0 directory and if I try something like /bgd2_0/category/Motels/ I get a 404.

I don’t know what’s causing this because I haven’t seen any of the “higher” .htaccess files do any rewriting. I have learned though that the highest .htaccess rewrites all 404s to the index.html of the root dir. How is it that it doesn’t recognize my index.php in /bgd2_0 dir? I have uncommented the DirectoryIndex index.php index.html rule in the /bgd2_0 .htaccess file that comes with TXP.

Offline

#2 2006-10-07 14:21:07

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

Re: Weird issue with clean urls

  • http://belgrade.cc/bgd2_0/index.php looks like it is running fine to me.
  • You’ve got the wrong site url entered, check your admin prefs.
  • Please post your diagnostics.

Offline

#3 2006-10-07 14:38:08

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: Weird issue with clean urls

Here are the diagnostics:

<pre>Textpattern version: 4.0.3 (r1188)
Last Update: 2006-10-05 12:35:56/2006-10-04 08:51:17
Document root: /home/FA05-16-11-05_fkvdvy3fad36b36z9cqd/belgrade.cc/public_html
$path_to_site: /home/FA05-16-11-05_fkvdvy3fad36b36z9cqd/belgrade.cc/public_html/bgd2_0
Textpattern path: /home/FA05-16-11-05_fkvdvy3fad36b36z9cqd/belgrade.cc/public_html/bgd2_0/textpattern
Permanent link mode: section_title
Temporary directory path: /home/FA05-16-11-05_fkvdvy3fad36b36z9cqd/belgrade.cc/public_html/bgd2_0/textpattern/tmp
Site URL: belgrade.cc/bgd2_0
PHP version: 4.4.4
Server Local Time: 2006-10-07 16:34:45
MySQL: 4.1.14-log
Locale: en_GB.ISO_8859-1
Server: Apache/1.3.37 (Unix) PHP/4.4.4 mod_ssl/2.8.28 OpenSSL/0.9.7d
Apache version: Apache/1.3.37 (Unix) PHP/4.4.4 mod_ssl/2.8.28 OpenSSL/0.9.7d
PHP Server API: apache
Server OS: FreeBSD 4.10-RELEASE-p3

Pre-flight check:
————————————
/home/FA05-16-11-05_fkvdvy3fad36b36z9cqd/belgrade.cc/public_html/bgd2_0/textpattern/setup/ still exists
————————————

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

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

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

#php_value register_globals 0

————————————
</pre>

My site url is: belgrade.cc/bgd2_0

http://belgrade.cc/bgd2_0/index.php works as I said – it’s the http://belgrade.cc/bgd2_0/ that is making the problem (and every other category/section in clean URL mode).

Offline

#4 2006-10-07 15:05:37

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Weird issue with clean urls

Uncomment the line that reads #DirectoryIndex index.php (i.e. remove the # sign at the beginning).

Offline

#5 2006-10-07 15:55:06

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: Weird issue with clean urls

Nope, doesn’t work then either. It shows the new .htaccess in the diagnostics but no change. I have left it now with DirectoryIndex index.php

Offline

#6 2006-10-21 17:09:41

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: Weird issue with clean urls

Hi people,
I seem to have another issue with URLs (clean vs. messy) on this TXP install. Maybe it’s a 404 thing – I don’t know. It seems that TXP isn’t always “aware” that we are on a certain section and it is interfering with if_section conditional tags. For example take a look at this URL: http://belgrade.org.yu/Bus/ and look in the yellow sidebar. Now try this: http://belgrade.org.yu/?s=Bus. See how the links list is now visible? I don’t quite understand this strange behavior. So far I have figured out that if I have multiple instances of if_section only the first one will be executed, the others will behave as if we are not on that section.

Can anyone help?

Offline

#7 2006-10-21 17:34:54

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

Re: Weird issue with clean urls

All my Section names are in lower case, the Section titles are not.

Have you tried using lower case Section names and using them in conditionals?

Offline

#8 2006-10-21 17:44:34

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: Weird issue with clean urls

My god that’s it. For some reason section names must be in lowercase. Interesting thing is that I always capitalize the title, but make name lowercase, but on this project I just left them capitalized.

Thanks a lot!

PS

So is this a bug or standard behavior?

Last edited by draganbabic (2006-10-21 18:11:59)

Offline

#9 2006-10-21 18:09:55

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

Re: Weird issue with clean urls

draganbabic wrote:

So is this a bug or standard behavior?

I would say standard, I haven’t looked at the code but you’d have to lowercase the name before any comparision could be made, which would slow things down.

Offline

#10 2007-01-09 17:28:32

mattgilbert
Member
Registered: 2006-03-23
Posts: 70

Re: Weird issue with clean urls

If this is standard behavior, then section names with uppercase characters should be prohibited, no?

Offline

Board footer

Powered by FluxBB