![]() | |
| |||
| Howdy folks, This might be a stupid question but I trying to figure out how to do a 301 redirect on the whole domain from http://www.thisisafakedomain.ie to http://thisisafakedomain.ie Does anybody know how to do this? I've found the code for the opposite way: Code: Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
__________________ Web Design Ireland |
| ||||
| Edit: ... nevermind ... misread Last edited by Forbairt; 27-09-2007 at 06:24 PM. |
| ||||
| just reverse the regex from the first example, no Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^www.domain.com [nc] rewriterule ^(.*)$ http://domain.com/$1 [r=301,nc]
__________________ My Blog |
| ||||
| Code: rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
Code:
rewritecond %{http_host} ^www.domain.com [nc]
rewriterule ^(.*)$ http://domain.com/$1 [r=301,nc]
|
| |||
| Ugh I'm pretty sure I tried that out Thanks for the help lads, Appreciate it!!
__________________ Web Design Ireland |
| Thread Tools | |
| Display Modes | |
|
|
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Just a random question, | Joseph Grogan | Off topic discussion | 16 | 17-11-2007 09:28 PM |
| Question Regarding Duplicate Content Mirrored Sites and multiple TLD's | Drang3d | Search Engine Optimisation | 4 | 31-03-2007 11:29 PM |
| Wordpress .htaccess file for no-www and mod-rewrite() | Cormac | Blogs & Blogging | 9 | 20-03-2007 08:31 AM |
| Bandwidth question | JamesA | Webmaster Discussion | 4 | 28-01-2007 09:56 AM |
| .htaccess query | Cormac | Server / Technical Administration Tips and Queries | 4 | 20-10-2006 09:54 AM |