Tags: , ,

htaccess Problem Solve


I’ve been trying to solve this little problem that pop up in the htaccess configuration. What I did was, I set up two wordpress blog in my server. One is this lovely personal blog of mine and the other one is my test blog. The test blog is where I do theme editing or testing and some other stuff related to wordpress.

The problem that I had was, I put the redirection code in the htaccess in the public_html not in my blog folder. I write in two redirection for each of blog in there. What it does? All my pages that I have in the test page will be redirected back to the personal blog which is this one. I write some simple About in the test blog. After clicking on it it just go back to my personal blog.

After asking around what should I do…. the solution:

Step 1: remove all code in the .htaccess in publi_html

Step 2: copy the .htaccess into you separate blog folder (if you already have it then skip to next step)

Step 3: Write the redirection code in each .htaccess blog. Ex:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /blog/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /blog/index.php [L]

</IfModule>

p/s: This code may be different from mine. I’m using wordpress.

Step 4: You are finish with it. It should work as mine did. I’m not going to tell you about the chmod of each file. I think you can figure that out. :)
Do leave comment on how you did it. Best of luck..

Tribute to: Mika(perfisio), Saifi(perfisio) & Wee Kit(visualdensity)

Posted in WebComments (0)





Advertise Here