Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-14 19:41:22

clemens_m
New Member
Registered: 2007-07-14
Posts: 3

Problems with simple mod_rewrite-rule

Hi there,

I want to use mod_rewrite in order to rewrite http://myhost.tld/~user/dir/news.html to http://myhost.tld/~user/dir/index.php?c=news.html.

Normally mod_rewrite works great on my vhost, but somehow I can’t get this to work with Textpattern:

Clean URLs work great, but if I go to http://myhost.tld/~user/dir/news.html I only see my Textpattern-Layout and a 404 (“404 Not Found – The requested resource was not found.”).

I’d appreciate any help, thanks in advance!

Here’s my .htaccess:

DirectoryIndex index.php index.html

Options +FollowSymLinks
Options -Indexes

<IfModule mod_rewrite.c>
        RewriteEngine On

        # ggf deaktivieren
        RewriteBase /~user/somedir/

        RewriteRule ^news\.html$ index.php?c=news

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

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

php_value register_globals 0

Last edited by clemens_m (2007-07-14 19:43:31)

Offline

#2 2007-07-15 22:57:49

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

Re: Problems with simple mod_rewrite-rule

Try:

RewriteRule ^news\.html$ index.php?c=news [L]

Offline

#3 2007-07-16 06:42:29

clemens_m
New Member
Registered: 2007-07-14
Posts: 3

Re: Problems with simple mod_rewrite-rule

Mary wrote:

Try:
RewriteRule ^news\.html$ index.php?c=news [L]

I have already tried that, unfortunately it gives me the same results.

Last edited by clemens_m (2007-07-16 06:43:55)

Offline

#4 2007-07-20 10:47:31

clemens_m
New Member
Registered: 2007-07-14
Posts: 3

Re: Problems with simple mod_rewrite-rule

Interestingly if I redirect news.html to another html-file (for example foo.html) everything works ok, it’s just the redirect to index.php that doesn’t work.

Offline

Board footer

Powered by FluxBB