Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-11-07 21:56:39

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Forcing index.php for clean urls???

I’ve been looking for the Apache modules too… and not finding anything in the usual places in which I find info

You can use phpinfo to display which modules are activated – see here for instructions and look for mod_rewrite in the output.

Very occassionally the htaccess needs tweaking slightly for particular hosts and it can be difficult to track down what is not actually working correctly. You might want to check the thread with clean url tweaks and try out some variations (note the thread goes back a while and some tweaks are for earlier versions).

“Are you just trying to rewrite all requests to index.php?”

The existing htaccess already directs all queries through index.php:

RewriteRule ^(.*) index.php

You’ll see when you switch back to messy urls that every page calls index.php and then a series of queries for the section or category.


TXP Builders – finely-crafted code, design and txp

Online

#14 2009-11-08 11:03:44

Kelon
Member
Registered: 2009-10-18
Posts: 16

Re: Forcing index.php for clean urls???

One of my ‘usual’ places is using phpinfo… one of the first things I did. The host is using something called suPHP which I’m unfamiliar with… no idea if it’s a determining factor here… I thought the above RewriteRule was routing everything to index.php… but as I always struggle with rewrite directives, I wasn’t 100% sure of myself so asked several times in this post for confirmation. Thank you Jakob for answering… I’ll confirm it to my host and see what they offer…

I’ve also been through the thread you suggest.. spent a fair amount of time on this, and am obviously just not getting something, my ineptitude with rewrite really frustrates me…. thank you.

Last edited by Kelon (2009-11-08 11:11:44)

Offline

#15 2009-11-08 11:43:53

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Forcing index.php for clean urls???

I use suPHP on multiple servers. Doesn’t cause problems with Textpattern.

Offline

#16 2009-11-08 12:35:52

Kelon
Member
Registered: 2009-10-18
Posts: 16

Re: Forcing index.php for clean urls???

Hi
The host have taken statements out of the .htaccess….. I was adding (uncommenting) statements in. ‘Less is more’. It works now cut down to just 4 statements (for info):

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule (.*) index.php

The statements below have been removed, no idea what the implications are:

RewriteBase /
RewriteRule ^(.+) – [PT,L]
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]

Thanks for your help.

Last edited by Kelon (2009-11-08 12:36:35)

Offline

#17 2009-11-08 17:56:50

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Forcing index.php for clean urls???

The only possible implication I can see is that you may not be able to use HTTP authentication, but that doesn’t always work anyway.

Offline

Board footer

Powered by FluxBB