• I’ve read http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory and it all looked quite straightforward – but obviously not for me.

    I’ve got wordpress in a subdirectory labelled wordpress.

    I got the code

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
    RewriteRule ^(/)?$ blog [L]

    and I altered it to:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?joe-music.net$
    RewriteRule ^(/)?$ blog [wordpress]

    but I’m getting a 500 error code – internal server error.

    What have I got wrong?

    (PS. I’ve put the original htaccess file back so the site looks normal at the moment. Site is http://www.joe-music.net and wordpress version is at http://www.joe-music.net/wordpress

    Thanks for reading.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try this

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?joe-music.net$
    RewriteRule ^(/)?$ wordpress/blog [L]
    Thread Starter judetheobscure

    (@judetheobscure)

    Thank you.

    Do I need the /blog bit – I don’t have a page with that address?

    I am going to do some tests on this (never needed to do this), will get back to you soon.

    Okay, did some tests on my server. Based on your .htaccess code, you are trying to redirect to your subdirectory, whenever people visit your domain, correct? Then it should be

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?joe-music.net$
    RewriteRule ^(/)?$ wordpress [L]

    if your folder name is “wordpress”, it worked on my test server. Now, I also tried following the instructions at

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    to copy only the index.php to the root, so all the wordpress files are under a folder called “wp”, well, that didn’t work for me. Don’t know if it’s not compatible with latest WordPress 3.4.1.

    Thread Starter judetheobscure

    (@judetheobscure)

    For the time being I just want to redirect the domain to the subdirectory so will give your code a whirl – thank you 🙂

    – should have realised that it was the word “blog” that needed replacing, not that bit in the brackets but you learn by experience 😉

    Hope you get some joy with your index.php thing.

    Okay, glad that was what you are looking for and solved the problem.

    Will continue my journey with the index.php thing, 🙂

    Thread Starter judetheobscure

    (@judetheobscure)

    Thank you again – worked fine 😀

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Pointing URL to sub-directory’ is closed to new replies.