![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | Problem: contents of a directory needs to be redirected to its own new domain. What is the best way? This seams like it should work but doesn't. Why? RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com/directory/$ [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L] This is working. RedirectMatch 301 /domain/(.*) http://newdomain.com/$1 -- D? http://wipkip.biz just to raise my PR |
|
| | #2 (permalink) |
| Civilians | Duende wrote: > RewriteCond %{HTTP_HOST} ^domain\.com/directory/$ [NC] HTTP_HOST only contains the host name -- not the full URL, so this will never match. Try: RewriteEngine On RewriteRule ^/directory/(.*)$ http://newdomain.com/$1 [R=301,L] -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact |
|
| | #3 (permalink) |
| Civilians | While sitting in a puddle Toby Inkster scribbled in the mud: > Duende wrote: > >> RewriteCond %{HTTP_HOST} ^domain\.com/directory/$ [NC] > > HTTP_HOST only contains the host name -- not the full URL, so this will > never match. > > Try: > > RewriteEngine On > RewriteRule ^/directory/(.*)$ http://newdomain.com/$1 [R=301,L] > Sorry Toby but that was a no-go. Guess I'll stay with: RedirectMatch 301 /directory/(.*) http://newdomain.com/$1 Thanks -- D? http://wipkip.biz just to raise my PR |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [MV] RTV Question | Chris Brunner | MV List | 1 | 04-22-2006 00:12 |
| DNS question/Webhosting question | s t e v e o | Web Design | 3 | 03-29-2005 04:00 |
| A needed workaround for RewriteEngine in .htaccess with FP | X | Web Design | 0 | 01-28-2005 08:00 |
| Question | Chis Boynton | BaseBall | 21 | 10-22-2004 12:00 |
| Well? 1.6 question | PAVELB1 | Gaming club | 1 | 08-04-2004 23:45 |
![]() | ![]() | ![]() |