Great Deals for a Great Cause – Site Point great deal

http://blogs.sitepoint.com/2011/01/18/great-deals-for-a-great-cause/

-Digital bundle of “Build your own Website the Right Way Using HTML & CSS, 2nd Ed”  
-Digital bundle of “The Principles of Beautiful Web Design, 2nd Ed”
-Digital bundle of “Build your own Wicked WordPress Themes”

For the next three days only, you can grab one of these for $9 OR all three for $18.

I bought all three, since I wanted two of them. My credit card company gave me some fuss since Site Point is outside of US, but other than that, the transaction was smooth and the pdfs are beautiful. Very easy to read too.

root index.php redirects to subdirectory

I have been working on this for several hours. My goal was to redirect /index.php to /blog/wordpress/index.php. The conditions are  1. I have virtual hosting. 2. I don’t want to move the blog files to my root directory, nor do I want to point all web access to the subdirectory.

my root folder htaccess is:

DirectoryIndex /blog/wordpress/index.php

This works great at first, my root access is going to the blog folder. And when you navigate around the blog site, the sub directory shows correctly. ( I never wanted to hide that).

However, when I tried to access the admin panel (/blog/wordpress/wp-admin/) I get the posts page, instead the dashboard. If I type  eonsong.com/blog/wordpress/wp-admin/index.php, it works.

Then, I tried several 301 redirects I found online. They either have no effect or throw my into a re-direct loop.

————-

I then changed my permalinks on my blog site from eonsong.com/blog/index.php/2011/postname/ to eonsong.com/blog/2011/postname/  This didn’t work at first because I didn’t copy the last two lines. My final htaccess looks like this:


DirectoryIndex index.php

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

(I had to add DirectoryIndex index.php, otherwise, http://eonsong.com/blog/wordpress/ will give me 403.


After this, my blog pages are showing pretty links correctly. wp-admin/ still shows dashboard correctly.

I then changed my root .htaccess to use DirectoryIndex /blog/wordpress/index.php again. This time, everything seems to be working fine.


Mod_Rewrite Tutorial:

http://www.easymodrewrite.com/guide-syntax