Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-06-09 16:50:10
- jamm1n
- Member
- Registered: 2008-04-23
- Posts: 19
301 redirect not working
Ok ,
I couldnt find this anywhere here, and its doin my head in. It is probably something simple, but I a n00b and can’t help it. sorry :(
so here goes.
with the txp htaccess file as per fresh install,
and clean urls ON, (/title)
i am trying to get a redirect going that removes the www part of my domain.
I have tried various [seemingly slightly different] versions of the 301 rewrite rule used to do this, and none seem to work (?)
I have the correct path in the config (no www), and the pre-flight check is throwing up no errors.
can anyone help please? I can see that the textpatten htaccess file is conditional in some way, but do not have the knowhow to add my bit to it.
t.i.a
Offline
#2 2008-06-09 17:39:48
- jamm1n
- Member
- Registered: 2008-04-23
- Posts: 19
Re: 301 redirect not working
ok i got it working.
RewriteCond %{HTTP_HOST} ^www\.domain\.net$ [NC]
RewriteRule ^(.*)$ http://domainnet/$1 [R=301,L]
Offline
Re: 301 redirect not working
FYI – Do a redirect directly in an article:
PHP: Page redirect with ‘more insistence’
(PHP) Solution works like a charme: “As PHP versions below below 4.3.0 won’t transmit the HTTP status set via the header() function, it might help to explicitly specify the HTTP response status with a little more insistence. Try this: …”
In the same thread (before) is a 2nd solution with a little less insistence.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#4 2008-06-10 12:50:42
- jamm1n
- Member
- Registered: 2008-04-23
- Posts: 19
Re: 301 redirect not working
ok! :) will try it out.
thanks for your time!
Offline
Re: 301 redirect not working
BTW: I took the tip from my own Textpattern del.icio.us repository (for tag ‘redirect’). Check out (or subscribe) to the tag ‘Textpattern’ or TXP’ to find more TXP related bookmarks.
I have also published my TXP feeds as dynamic OPML file which you might consider subscribing to.
More info about my Textpattern OPML file
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#6 2008-06-10 16:34:31
- jamm1n
- Member
- Registered: 2008-04-23
- Posts: 19
Re: 301 redirect not working
thanks for the OPML! – I already have subscribed to Textpattern on del.icio.us … I shall add TXP for good measure :)
Offline
Pages: 1