Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    1

    Default Website redirect -.htaccess?

    I'm trying to redirect a site hosted on WH (mysite.com) to my blog, but can't figure out how to modify the .htaccess file. i've failed at several attempts, any input would be helpful.

    the current .htaccess file looks like this:


    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/home/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/home/index.php [L]
    </IfModule>

    # END WordPress


    How do I modify the file to redirect "www.mysite.com" to my worpress blog? (hosted on same site) and to a specific landing page in the blog (www.mysite.com/wordpress/home

    thanks!

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    Try this in your public root. If you are on an older Site Manager account that is /var/www/html

    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule /wordpress/home
    </IfModule>
    # END WordPress
    I think that should work for you. I am assumeing that you are using the SEO friendly urls in wordpress and have the .htaccess file they provide in the /var/www/html/wordpress directory.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Junior Member
    Join Date
    Jun 2011
    Posts
    3

    Default

    Hello, I'm new for this forum and I'm not sure that my question is related to this thread but somebody can help me, I appreciate for it.

    I use b2evelution for my blog page and it is linked from my top page . It worked very well until last month (I'm not sure when the link started to not work).
    The URL is as http://mydomain.com/myblog/index.php
    Also, I can't access to the Log in page . it's like http://mydomain.com/myblog/admin.php

    When I tried to see the page on the browser, the browser give a pop up window and ask, if I want to download this page.
    I used to be able to see the page but not right now and suddenly. Why?
    What I remember is I updated PHP version to 5.3.6 last month in my site manager. Is this related with this problem?

    My blog is installed the directly , /var/www/html/myblog

    WH customer support told me the ".htaccess " file may be something wrong but not sure. But I don't know which .htaccess file is wrong, the file /var/www/html/.htaccess or /va/www/html/myblog/.htaccess? The agent told me that he will ask to manager but unfortunately, I couldn't get any solution so far.
    I checked the .htaccess file of myblog folder by FTP, the file is empty, nothing was written.

    I still use Site Manager and my Top page is MIVA store front.
    Is there any idea to solve this problem?

    Thank you very much.

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    What if anything is in the /var/www/html/.htaccess file. With .htaccess files the server reads that one first and then would read the one in /var/www/html/myblog/.htaccess which means that the .htaccess file used for Miva that is in /var/www/html/.htaccess could be affecting things. Go ahead and post what is in /var/www/html/.htaccess and I'll give it a once over to see if I can figure out what WH support was talking about.

    You aren't having any issues with Miva right?
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5
    Junior Member
    Join Date
    Jun 2011
    Posts
    3

    Default

    Hi, thank you for your response.
    The /var/www/html/htaccess is as below.
    I have no any issue for MIVA. While I have other pages such as HELP, Contact us which were made outside MIVA and sit at /var/www/html/HELP, it was linked correctly.
    ______________________________________
    ### Begin - Inserted by Miva Merchant

    DirectoryIndex /mm5/merchant.mvc?Screen=SFNT

    RewriteEngine On

    RewriteRule ^mm5/admin.mvc? - [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^product/([^/.]+).html$ /mm5/merchant.mvc?Screen=PROD&Product_code=$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^category/([^/.]+).html$ /mm5/merchant.mvc?Screen=CTGY&Category_code=$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Screen=PROD&Category_code=$1&Product_ code=$2 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/.]+).html$ /mm5/merchant.mvc?Screen=$1 [L]

    ### End - Inserted by Miva Merchant

  6. #6
    Junior Member
    Join Date
    Jun 2011
    Posts
    3

    Talking Solved

    This problem was solved (finally could receive the solution from Tech support).

    The issue was PHP which was not properly installed and they reinstalled and now works correctly.

    Thank you for Westhost Tech support.

  7. #7
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    Good to hear! That was actually going to be my next suggestion if I did not see anything in your .htaccess file. Guess I should have mentioned that from the start, it may have gotten you back up and running faster but the fact that support made mentioned .htaccess made me think maybe they had seen something. Also I do know that with Gallery3 and some of the things it tries to put in the .htaccess file there are issues. I just moved someone to a new cPanel account and which had a newer version of PHP installed and I had to remove some directives from the .htaccess file. For anyone who may read this in the future that is a good place to look. You can always rename the .htaccess file to something like backup.htaccess just to test real fast if you are getting server errors. As a rule the things that program put in .htaccess are not vital to the running of the program but affect either extras or things like SEO URLS.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

Tags for this Thread

Posting Permissions

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