Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
.htaccess question
Here’s the thing. I have 2 domeins pointing to my site, the new one is the one I want all people to go to, so I would like to when people type in the old domain, still get the new one, and I bet .htaccess can resolve this for me. So this is what I’ve tried:
<pre>Redirect permanent http://semperfi-1982.com http://dnevnikeklektika.com</pre>
And guess what—when I type http://semperfi-1982.com and hit go, I still get semperfi-1982.com and not dnevnikeklektika.com. i have placed the rule on the verry top of the TXP-s .htaccess so now it looks like this:
<pre>Redirect permanent http://semperfi-1982.com http://dnevnikeklektika.com
#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]
RewriteRule ^(.*) index.php </IfModule></pre>Last edited by Dragan (2005-11-01 09:46:30)
Offline
Re: .htaccess question
Use the following if you want to redirect based on the domain.
<pre>
RewriteCond %{HTTP_HOST} semperfi-1982.com
RewriteRule ^(.*)$ http://dnevnikeklektika.com/$1 [R=permanent,L]
</pre>
Offline
Re: .htaccess question
whooooah man, works like a charm :D, thanx heaps …
Offline
Re: .htaccess question
And the problem with the first one was that that sort of redirect expects a relative URL, not an absolute one, as its first argument. So Redirect permanent / http://dnevnikeklektika.com
would probably have worked.
You cooin’ with my bird?
Offline
Re: .htaccess question
^ yes, I have taken that form an example that had a relative path. it is more for the like of:
<pre>Redirect permanent /folio http://dnevnikeklektika.com/archive/folio</pre>
Offline
Pages: 1