Results 1 to 2 of 2
  1. #1

    Default Wordpress in Folder - Best way to redirect domain?

    I have a westhost preferred reseller account.

    The main domain is mendla.com I have a couple of other sites on the account. Those are in folders under \sites.

    I intend to create a site for Mendla.com using wordpress. I didn't want all of the wordpress files and folders under the root so I put them under mendla.com/wp.

    So far that is working OK.

    I want the wordpress installation to be the mendla.com site. Can I set up a redirect in htaccess so that requests for Mendla.com or www.mendla.com are directed to the wordpress site at mendla.com/wp? Or is there some better way of doing this???



    thanks

    chris

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

    Default

    Well personally I would move Wordpress to your main folder. Easier to maintain and less likely to run into issues that way.

    You should be able to us htaccess though. In fact if I recall Worpress uses htaccess to process all calls through the program. Most likely looks something like this.

    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    You can try and move that to your main directory. I think changing the last line to:
    Code:
    RewriteRule . /wp/index.php [L]
    should get you where you want.

    The other thing I've done for CMS's like this is copy the index.php file to the main along with the .htaccess file unchanged. The only problem with that is you normally have to dig into the config files and alter some things in the copied index.php file. For example CMS well often base the config of where files are off of where the index.php is located. So I've had to actually hardcode those configurations into my index.php file that I've moved. Not all CMS's allow for this overide but I think Wordpress does, I am just not sure what they are.

    So again bottom line... just install WP in your main directory. You'll be happier in then end and have less headaches.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

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

Posting Permissions

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