Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-20 14:13:29

rooty
New Member
Registered: 2007-04-20
Posts: 2

Mod_rewrite and clean urls

Hi!
I’d like to have thoose url, /blog/cat/flow/etc/ – as a clean url mode. Now it’s messy and not cool to search engines like google.

I have Apache2 running on my Ubuntu server. I linked mod_rewrite.load from /etc/apache2/mods-available/ to /mods-enabled/. In phpinfo() it shows that Apache has mod_rewrite installed.

My httd.conf file;
# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

From diagnostics in TextPattern:

.htaccess file contents:
————————————
DirectoryIndex index.php index.html
Options +FollowSymLinks
RewriteBase /

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(Om|Blog)(.*) index.php

</IfModule>

I tried tons of ways fixing my problem. Most of the guides reply on Apache1.3 or different RewriteRule, as the one I’ve written above. Nothing helps.

Out of options, please follow me in correct direction please.

/rooty (sorry for the incorrect english)

Last edited by rooty (2007-04-20 14:16:51)

Offline

#2 2007-04-20 17:06:08

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Mod_rewrite and clean urls

It has taken me ages to get clean urls working locally as well. I don’t know very much about it, but trial and error finally made it work. It’s quite a while ago and I don’t remember exactly what I did, but uncommenting both these lines in httpd.conf was important:

LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

and also I think that I changed None to FileInfo here:

<Directory />
    Options FollowSymLinks
    AllowOverride FileInfo
</Directory>

Offline

#3 2007-04-20 18:14:01

rooty
New Member
Registered: 2007-04-20
Posts: 2

Re: Mod_rewrite and clean urls

Hi. Thanks for the quick help, but I found a shortcut.

I tried this guide -> http://textpattern.com/weblog/135/partly-messy-clean-urls-without-modrewrite-experimental

Now I removed the define() from the config file, but the clean urls still work. In diagnostics it says; clean url test fail – but at the site it works.
Weird.
Proberly gonna try your example anyways, thanks.

Last edited by rooty (2007-04-20 18:29:38)

Offline

Board footer

Powered by FluxBB