Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » clean url

#1 2007-04-10 15:51:07

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

clean url

A while back i tried a few things to get clean urls going with my web host.
All failed and i gave up.

Heres the server info from the textpattern diagnostic.
I’m posting this in hopes that someone will be able to further advise me regarding the compatibility of clean urls on this server.

Site URL: nwtc.ie
PHP version: 4.4.4
Register globals: 1
Server time: 2007-04-10 11:43:56
MySQL: 3.23.57
Locale: en_GB.UTF-8
Server: Apache/1.3.37 (Unix) mod_watch/3.17 mod_ssl/2.8.28 OpenSSL/0.9.8d PHP/4.4.4
Apache version: Apache/1.3.37 (Unix) mod_watch/3.17 mod_ssl/2.8.28 OpenSSL/0.9.8d PHP/4.4.4
PHP mode: apache
rfc2616_headers:
Operating System: Linux 2.4.21-47.EL


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2007-05-15 04:55:09

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: clean url

So clean urls scare me, because they’re as fragile as a dandelion in the wind, but let’s see what we can do to help. Can you confirm that mod_rewrite is enabled? If you don’t know, you can use the example in this thread to check.

Let me know

Offline

#3 2007-05-15 20:47:36

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: clean url

hi amit,

Ok great, I did the mod rewrite test and i get the following error:

Server not found

Firefox can’t find the server at www.mcmongle.biz……..

I will contact my web host and see if he can enable mod_rewrite.

thanks

Last edited by kvnmcwebn (2007-05-15 22:47:22)


its a bad hen that wont scratch itself.
photogallery

Offline

#4 2007-05-16 00:20:33

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: clean url

ok this is a message from my hosts support guy who is helpful,
i dont know where to go from here:

Kevin,

The following is the apache directive for mcmonagle.biz:

<VirtualHost 10.100.1.51 71.41.73.81>
ServerAdmin webmaster@korksoft.com
DocumentRoot /home/kvnmcwebn/www
ServerName mcmonagle.biz
ServerAlias www.mcmonagle.biz
CustomLog /home/kvnmcwebn/logs/access_log combined
ErrorLog /home/kvnmcwebn/logs/error_log
ScriptAlias /cgi-bin/ /home/kvnmcwebn/www/cgi-bin/
<Directory /home/kvnmcwebn/www/> Options All AllowOverride All
</Directory>
</VirtualHost>

The following are the modules for apache:

[root@www1 bin]# ./httpd -l
Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_rewrite.c mod_access.c mod_auth.c mod_so.c mod_setenvif.c mod_php4.c mod_interchange.c
suexec: disabled; invalid wrapper /home/httpd/bin/suexec

I checked the apache config, and the module is loaded for use in httpd.conf

Your error log shows this:

[Tue May 15 19:14:27 2007] [alert] [client 216.195.144.198] /home/kvnmcwebn/www/.htaccess: Invalid command ‘{\\rtf1\\mac\\ansicpg10000\\cocoartf824\\cocoasubrtf420’, perhaps mis-spelled or defined by a module not included in the server configuration

Last edited by kvnmcwebn (2007-05-16 00:22:58)


its a bad hen that wont scratch itself.
photogallery

Offline

#5 2007-05-16 01:40:31

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

Re: clean url

What is in your .htaccess file? Can you paste it here, in its entirety?

Offline

#6 2007-05-17 10:42:13

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: clean url

Hi mary, here is the one i really need to get working its from the widescreen photo blog template which requires clean urls.
I took out the subfolder path bit on the uploaded version

#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]

#This path should match the relative url of your Textpattern install
RewriteBase /PUT-SUBFOLDER-PATH-HERE-IF-NECESSARY
#If you’re using a section other than “tag”, change the following two rules accordingly
RewriteRule ^tag/([^/]+)$ tag/$1/ [R,L]
RewriteRule ^tag/(.+)/$ ?s=tag&t=$1

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

#php_value register_globals 0

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000


its a bad hen that wont scratch itself.
photogallery

Offline

#7 2007-05-18 01:54:35

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

Re: clean url

Okay, for the moment let’s ignore the tag urls and try getting regular clean urls working first.

# Options +FollowSymLinks

# DirectoryIndex index.php index.html

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000

# php_value register_globals 0

<IfModule mod_rewrite.c>
	RewriteEngine On

	RewriteBase /

	# RewriteRule ^tag/([^/]+)$ tag/$1/ [R,L]
	# RewriteRule ^tag/(.+)/$ ?s=tag&t=$1

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

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

What happens with that? Any progress?

Offline

#8 2007-05-18 11:35:28

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: clean url

Hi Mary,
Tried that it but still get a 500 error.
Im considering giving up running clean urls on my current host. Its a shame though because i’ve recently renewed my plan.
Last week I set up a textdrive/joyent hosting account and might transfer the site over to there.
What do you suggest?


its a bad hen that wont scratch itself.
photogallery

Offline

#9 2007-05-18 11:51:41

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,349
Website GitHub Mastodon Twitter

Re: clean url

kvnmcwebn wrote:

Im considering giving up running clean urls on my current host. Its a shame though because i’ve recently renewed my plan.
Last week I set up a textdrive/joyent hosting account and might transfer the site over to there.
What do you suggest?

Your host is up to you but lots of us are on txd and clean urls work just fine…


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2007-05-18 12:28:32

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: clean url

>>..Lots of us are on txd and clean urls work just fine…

Allright ill do that then.


its a bad hen that wont scratch itself.
photogallery

Offline

#11 2007-05-20 01:38:43

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

Re: clean url

You could further try removing/commenting out the ExpiresActive lines.

Offline

#12 2007-05-20 20:00:57

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: clean url

Hi Mary,
Thanks a mill – after removing the ExpiresActive code the clean urls are now working.
I wont have time to test it thoroughly till tomorrow but it looks like I can keep this site on my current host.
I think the ExpiresActive was there to prevent hot images from flickering on hover-but im not sure.

Oh btw do you think this .htaccess file would be suitable for my other site on that same host?
I mean does is appear to be specifically for the photo blog template?

  1. Options +FollowSymLinks
  1. DirectoryIndex index.php index.html
  1. php_value register_globals 0

<IfModule mod_rewrite.c> RewriteEngine On

RewriteBase /

# RewriteRule ^tag/([^/]+)$ tag/$1/ [R,L] # RewriteRule ^tag/(.+)/$ ?s=tag&t=$1

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

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

Last edited by kvnmcwebn (2007-05-20 20:11:37)


its a bad hen that wont scratch itself.
photogallery

Offline

  1. Index
  2. » Archives
  3. » clean url

Board footer

Powered by FluxBB