Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default .htaccess and domain problem

    Hi, I have some issue with my new domain. The problem is when I type www.mynewdomain.com in the browser, it appears something like www.myolddomain.com/mynewdomain/ directory. My hosting company have looked into this matter and told me that something inside my .htaccess must have caused this. I'm not sure what zen mod I used to modify the .htaccess file. Maybe it's the Ultimate SEO URL mod or could be something else. Can someone please look at my .htaccess and let me know what should I do?

    PHP Code:
    AddHandler application/x-httpd-php4 .php
    ##### NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase 
    /

    # From Ultimate SEO URLs
    RewriteRule ^(.*)-p-(.*).htmlindex\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-c-(.*).htmlindex\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-m-([0-9]+).htmlindex\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pi-([0-9]+).htmlindex\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pr-([0-9]+).htmlindex\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pri-([0-9]+).htmlindex\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]

    # For Open Operations Info Manager
    RewriteRule ^(.*)-i-([0-9]+).htmlindex\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

    # For dreamscape's News & Articles Manager
    RewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]
    RewriteRule ^news/rss.xmlindex\.php?main_page=news_rss&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]
    RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).htmlindex\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).htmlindex\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+)-comments.htmlindex\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+).htmlindex\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

    # All other pages
    # Don't rewrite real files or directories
    RewriteCond %{REQUEST_FILENAME} !-[NC
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule 
    ^(.*).htmlindex\.php?main_page=$1&%{QUERY_STRING} [L]

    # =============================================================
       
    <IfModule mod_rewrite.c>
         
    RewriteEngine On
         RewriteBase 
    /
     
    #   -----------------------------------------------------------
         
    RewriteCond %{HTTP_HOST} !^www\.mens-designer-jackets\.com [NC]
         
    RewriteRule ^(.*)  http://www.mens-designer-jackets.com/$1 [L,R=301]
     #   -----------------------------------------------------------
       
    </IfModule>
     
    # =============================================================
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    deny from 38.99.203.110 

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,252
    Plugin Contributions
    59

    Default Re: .htaccess and domain problem

    The only redirect in your config is the following canonical redirect...

    Code:
    # =============================================================
       <IfModule mod_rewrite.c>
         RewriteEngine On
         RewriteBase /
     #   -----------------------------------------------------------
         RewriteCond %{HTTP_HOST} !^www.mens-designer-jackets.com [NC]
         RewriteRule ^(.*)  http://www.mens-designer-jackets.com/$1 [L,R=301]
     #   -----------------------------------------------------------
       </IfModule>
     # =============================================================
    If this (www.mens-designer-jackets.com) is not your new domain then you need to change the url in the redirect/rewrite to the new domain.

    Additionally, it is most likely wise to redirect the old domain to the new, as this will (after a while) transfer any PageRank and backlinks to the new domain url.

    Cheers,
    Melanie

  3. #3
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default Re: .htaccess and domain problem

    Please look at the 'URL' within these two links here,

    Without - WWW (As you can see my new domain next to old one)
    With - WWW (No problem when I include the 'www')

    See the differences?

    When I change the 'redirect' URL in the .htaccess to my new domain, the old domain which is 'M-D-J'.com redirect to the new domain, which means the MDJ's site will not appear. I hope you got what I mean.

    Should I create another .htaccess for the new domain?

  4. #4
    Join Date
    Oct 2006
    Location
    At Home
    Posts
    370
    Plugin Contributions
    0

    Default Re: .htaccess and domain problem

    I just created another .htaccess file and change the URL's to my 2nd domain. It seems fine now. But is it OK to have several .htaccess for each website directory?

  5. #5
    Join Date
    Sep 2007
    Posts
    27
    Plugin Contributions
    0

    Default Re: .htaccess and domain problem

    Having a seperate htaccess file in different folders is fine.

    In fact, a lot of scripts have this.

 

 

Similar Threads

  1. v150 .htaccess and Admin Area Problem
    By Sanguinarius in forum Installing on a Linux/Unix Server
    Replies: 11
    Last Post: 16 Mar 2013, 11:45 PM
  2. v150 Ultimate SEO .htaccess problem and broken Admin interface
    By erint29 in forum All Other Contributions/Addons
    Replies: 33
    Last Post: 27 Aug 2012, 06:56 PM
  3. .htaccess redirect to new domain
    By Convergence in forum General Questions
    Replies: 5
    Last Post: 4 Aug 2010, 06:47 AM
  4. Replies: 3
    Last Post: 11 Apr 2010, 07:57 AM
  5. SEO, htaccess and domain redirect
    By hubert in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Oct 2007, 08:19 PM

Posting Permissions

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