Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Closed Thread
Results 1 to 3 of 3

Thread: small htaccess issue

  1. #1
    mr_bill is offline Member mr_bill is on a distinguished road
    Join Date
    Jul 2007
    Posts
    32

    Default small htaccess issue

    So I had a site setup on a subdomain which I moved to the main domain. I was trying to setup a 301 redirect from the subdomain to main but have ran into a problem

    original url was in this format http://www.subdomain.some-domain.us i want to 301 redirect to http://www.some-domain.us but the code I used ended up doing this instead http://www.some-domain.us/subdomain

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} www.subdomain.some-domain.us$ [NC]
    RewriteRule (.*)$ http://www.some-domain.us/$1 [R=301,L]
    Could someone add me in fixing this issue

  2. #2
    Bagi Zoltán's Avatar
    Bagi Zoltán is offline Boss Cart consultant Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of
    Join Date
    Feb 2007
    Location
    Veszprém, Hungary
    Posts
    1,225

    Default

    I would try this one
    Code:
    Redirect 301 / http://www.some-domain.us/
    .

  3. #3
    mr_bill is offline Member mr_bill is on a distinguished road
    Join Date
    Jul 2007
    Posts
    32

    Default

    Here is how I ended up getting it to work
    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^directory.search-for.us$ [OR]
    RewriteCond %{HTTP_HOST} ^www.directory.search-for.us$
    RewriteRule ^/?(.*)$ http://www.search-for.us/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^search-for.us$ [OR]
    RewriteCond %{HTTP_HOST} ^www.search-for.us$
    RewriteRule ^directory/?(.*)$ http://www.search-for.us/$1 [R=301,L]
    Even though seems one too many steps. Now it wont let me drop the index.php from the urls.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Multilanguage issue
    By lala in forum General Webmaster Talk
    Replies: 12
    Last Post: 03-16-2007, 03:44 PM
  2. Web 2.0 causes serious privacy issue
    By temi in forum General Webmaster Talk
    Replies: 0
    Last Post: 05-24-2006, 11:52 AM
  3. Windows ME issue
    By clau in forum Computer and Software Forum
    Replies: 3
    Last Post: 12-13-2005, 07:43 AM
  4. Installation issue
    By ebabjohn in forum iG Shop
    Replies: 0
    Last Post: 01-06-2005, 04:41 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124