Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-11 14:29:44

moskovich
New Member
Registered: 2005-12-11
Posts: 4

How to get clean URLs on OS X Tiger with Textpattern 4.0.2?

Hopefully somebody can help with this one. When I get this working I will write a nice tutorial for everyone else.

I added the following to my httpd.conf file:

<code>
<Directory /Users/*/Sites> AllowOverride All
</Directory>
</code>

Running Diagnostics gives me the following output:

<code>
Textpattern version: 4.0.2 (r1076)
last_update: 2005-12-02 17:58:31/2005-11-01 15:01:29
Document root: /Library/WebServer/Documents
$path_to_site: /Users/mosko/Sites/textpattern-4.0.2
Textpattern path: /Users/mosko/Sites/textpattern-4.0.2/textpattern
Permanent link mode: section_title
Temp folder: /private/var/tmp
Site URL: mosko.local/~mosko/textpattern-4.0.2
PHP version: 5.0.4
Server time: 2005-12-11 22:18:25
MySQL: 4.1.12-standard
Locale: en_GB.UTF-8
Server: Apache/1.3.33 (Darwin) PHP/5.0.4
Apache version: Apache/1.3.33 (Darwin) PHP/5.0.4

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
RewriteBase /~mosko/textpattern-4.0.2/

<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

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

I’ve check my Apache configuration and mod_rewrite is loaded. Anybody have any ideas?

Thanks in advance for the help.

-Mosko

Offline

#2 2005-12-12 05:22:51

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: How to get clean URLs on OS X Tiger with Textpattern 4.0.2?

Mosko,

I think everything will be much easier if you just stick to the standard .htaccess that comes with TXP and create a virtual host (I create one for each TXP site that I build). So at the bottom of my httpd.conf file I have

<code>
NameVirtualHost *:80</code>
<code>
<VirtualHost *:80>
</code> DocumentRoot /Applications/mamp/htdocs <br /> ServerName localhost
<code>
</VirtualHost>
</code>
<code>
<VirtualHost *:80>
</code> DocumentRoot /Applications/mamp/htdocs/myservername<br /> ServerName myservername
<code>
</VirtualHost>
</code><br />

<p>To get your Mac to comply with this, you will also want to add “myservername” as a machine in the netinfomanager.app in /Applications/Utilities with the following property/values:</p>

ip_address: 127.0.0.1
name: myservername
serves: ./local

This way you can have URLs like http://myservername/txpsection/txparticlename on your Mac, so it will more closely match that of the live server and share the same .htaccess file.

Matt

P.S. MAMP seems to work well too as a PHP/Apache/MySQL test bed

Last edited by aesop1 (2005-12-12 05:31:30)

Offline

#3 2005-12-16 14:05:22

moskovich
New Member
Registered: 2005-12-11
Posts: 4

Re: How to get clean URLs on OS X Tiger with Textpattern 4.0.2?

Matt-

Thanks a lot for the help. Sorry for the slow reply post. I was out of the country and didn’t have internet access.

I’ve setup a virtual host and can access it fine. But I still don’t have clean URLs. I’m using the default .htaccess file now. I’ve messed around a bit with RewriteBase but nothing seems to work. Anymore ideas?

<code>
.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#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> </code>

Offline

#4 2005-12-16 17:12:08

moskovich
New Member
Registered: 2005-12-11
Posts: 4

Re: How to get clean URLs on OS X Tiger with Textpattern 4.0.2?

I just got this working a few minutes ago. I added this block to my httpd.conf file:

<code>
<Directory “/Users/mosko/Sites/projects/Jones/”> Options All AllowOverride All Order allow,deny Allow from all
</Directory>
</code>

Is there a better way or is this pretty standard?

Offline

Board footer

Powered by FluxBB