Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-02-27 14:50:02
- hachi
- Member
- From: switzerland
- Registered: 2004-04-24
- Posts: 25
clean URLs stop working after updating to rc3 on local os x install
hi
I’m having the following problem:
I just updated my local os x test install of txp from rc2 to rc3 (rev121) with svn. I followed the instructions dean gave in his rc3 announcement post.
i deleted all the old placeholder files and changed url mode to /section/id/title.
but now, if i try to open
<code>www.mysite.com/section or
www.mysite.com/section/id/title</code>
all i get is a 404 not found error. this used to work with rc2 with the old placeholder files. i didn’t need the .htaccess file, since i could set everything to work in my httpd.conf file. i have enabled the mod_rewrite module and set
<code>AllowOverride All</code>
I also checked if I have the correct .htaccess and index.php file. they look exactly like the ones in the svn repository on trac.
And I also did a fresh install and tried using the clean url feature. still only 404 errors.
Any help greatly appreciated. h.
EDIT: It still works when i put the old placeholder files in my root directory??
My diagnostics, if anybody needs them:
Textpattern version: 1.0rc3
Document root: /Users/oliver/Sites/directory
$path_to_site: /Users/oliver/Sites/directory
Textpattern path: /Users/oliver/Sites/directory/textpattern
Permanent link mode: section_id_title
tmp_dir: /private/var/tmp
Site URL: www.mysite.site
PHP version: 4.3.10
Magic quotes: 1/0
Locale: en_GB
Server: Apache/1.3.33 (Darwin) PHP/4.3.10
Apache version: Apache/1.3.33 (Darwin) PHP/4.3.10
.htaccess file contents:
————————————
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
————————————
Last edited by hachi (2005-02-27 15:03:55)
Offline
#2 2005-02-27 22:15:47
- hachi
- Member
- From: switzerland
- Registered: 2004-04-24
- Posts: 25
Re: clean URLs stop working after updating to rc3 on local os x install
I just found this topic over at the textdrive forums. Thank god, I’m not alone ;-)
Last edited by hachi (2005-02-27 22:16:45)
Offline
#3 2005-02-27 23:04:23
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: clean URLs stop working after updating to rc3 on local os x install
The problem is caused by your Apache configuration. The txp .htaccess file is designed to work with the vhost setup used by most web hosting companies.
Try the second .htaccess file listed here. You’ll probably need to edit the path in the final RewriteRule (perhaps /directory/index.php or similar).
Alex
Offline
#4 2005-02-28 09:36:07
- hachi
- Member
- From: switzerland
- Registered: 2004-04-24
- Posts: 25
Re: clean URLs stop working after updating to rc3 on local os x install
Hi zem. Thanks for answering.
I tried both. I put
<code>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule (.*) index.php
</code>
or
<code>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule (.*) /index.php
</code>
in my .htaccess file and put it in the root of my textpattern directory (e.g. /users/name/sites/directory_where_index.php_is/.htaccess). Neither of them worked.
That way it shouldn’t be necessary to edit the last line of .htaccess, should it? I also tried putting the .htaccess file directly in my sites directory and edited the last line in:
<code>RewriteRule (.*) dir_where_index.php_is/index.php</code>
or
<code>RewriteRule (.*) /dir_where_index.php_is/index.php</code>
neither of them did work. I even tried putting
<code>
ErrorDocument 404 /index.php
</code>
or
<code>
ErrorDocument 404 index.php
</code>
in the .htaccess and I’m still getting the 404 errors.
btw. I set up my virtual host like described here
Did I do something wrong? Please help. Thanks again.
Last edited by hachi (2005-02-28 09:38:05)
Offline
#5 2005-02-28 17:40:59
- hachi
- Member
- From: switzerland
- Registered: 2004-04-24
- Posts: 25
Re: clean URLs stop working after updating to rc3 on local os x install
thanks for pointing this out grommet. but my problem is not that the virtual host domains aren’t working (e.g. www.blog.site). they do work. the only thing which is not working are the new clean urls with the new .htaccess and index.php. so i can’t use these new files on my local install.
i tried changing the virtual host ip’s to the virtual server names though. just to check if it works with this (and yes, i restarted web sharing). but unfortunately it still doesn’t work.
Offline
Re: clean URLs stop working after updating to rc3 on local os x install
Add the following underneath the virtual host addition in your httpd.conf, changing the path to point to your virtual host:
<code>
<Directory /path/to/virtual/site/folder>
AllowOverride All
</Directory>
</code>
This allows you to use .htaccess files & override the default os x apache config. Hopefully will work fine after you’ve done this and restarted apache – making sure the textpattern .htaccess file is in place.
Last edited by Case (2005-02-28 23:32:26)
Forget your dreams
Offline
#7 2005-03-01 15:25:49
- hachi
- Member
- From: switzerland
- Registered: 2004-04-24
- Posts: 25
Re: clean URLs stop working after updating to rc3 on local os x install
case: your suggestion works, if i only have one virtual host (e.g. www.mysite.site). but if i have more than one, the clean again stop to work.
BUT:
everything’s working now. i just had to get rid of the virtual host domains (e.g. www.mysite.site) i created in the netinfo manager and place all my documents in /library/webserver/documents/subfolder. then i could call http://localhost/subfolder in my browser and suddenly everything worked (clean urls etc.).
i’m adding the changes i had to do in the httpd.conf file for anybody who should need it:
line 520: DefaultType application/x-httpd-php
line 404: AllowOverride All
line 443: DirectoryIndex index.php index.html
restart websharing via system preferences/sharing and you should be all set.
thanks for trying to help, though!
Offline