• I’m not really sure my post title is an accurate way to say what I’m wanting to do.

    My Apache web server is currently set so “www.example.com” looks at /var/www for index.html. My wordpress files are in /var/www/wordpress. I currently have the index.html file in /var/www configured to immediately redirect to “www.example.com/wordpress/”. Under this configuratoin, blog links show as “www.example.com/wordpress/?p=xxx”. Isn’t there a way to use an alias or something so that it will just look like “www.example.com/?p=xxx”, yet still have the /var/www/wordpress folder structure on the server?

Viewing 5 replies - 1 through 5 (of 5 total)
  • This might address what you are looking to do
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Hi,

    You need to move your blog from wordpress directoryu to the root directory of your domain..

    [spam link moderated]

    and add this code in htaccess file of your domain:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Thanks,

    Shane G.

    Thread Starter limekiller

    (@limekiller)

    stvwlf, That looks like what I needed. I hadn’t been clear on what those options did prior to seeing the link you suggested. I thought it was going to take some Apache kung-fu to get it done.

    Thread Starter limekiller

    (@limekiller)

    I found an option to do this through apache that I haven’t yet got the kinks worked out of, but it will do what I want with more flexibility than the previous procedure mentioned. I added the following to httpd.conf

    <VirtualHost *:80>
        DocumentRoot /var/www/wordpress
        ServerName www.example.com
    </VirtualHost>

    That assigns the root folder for “servername” to “documentroot”. The kink is that the main page loads, but is missing the style sheets, and links are broken. I think that’s going to be fairly simple to fix, but I haven’t found the answer yet.

    I’ve got my virtual hosts setup but I’ve just encountered the same style sheets issue. Just in case your still out there Limekiller… did you find the solution?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How to alias hostname direct to wordpress folder?’ is closed to new replies.