Getting problem with RewriteCond and RewriteRule
Written by pnyet   
I've been using Apache as a standalone web server for long time a go, and apache running on CentOS 5.4. I don't have a significant problem. But today I am having problems with RewriteCond and RewriteRule in .htacces. My blog (http://blog.pnyet.web.id) wich uses wordpress 2.9.1 CMS. I found a problem when creating a new subdomain and subdirectory in public_html folder and it has not solved until now.
ngiknguk

I've VirtualHost for the domain blog.pnyet.web.id and main directory is public_html/blog, for the configuration see below:

<VirtualHost blog.pnyet.web.id:80>
<Directory "/home/www/ngiknguk/public_html/blog">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

    ServerAdmin This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
    DocumentRoot /home/www/ngiknguk/public_html/blog
    ScriptAlias /cgi-bin/ /home/www/ngiknguk/public_html/blog/cgi-bin
    ServerName blog.pnyet.web.id
    ServerAlias blog.pnyet.web.id
    ErrorLog logs/blogpnyet-error_log
    CustomLog logs/blogpnyet-access_log common
</VirtualHost>

These days I made a thid level domain  name it img.blog.pnyet.web.id, and see below for VirtualHost configuration:

<VirtualHost img.blog.pnyet.web.id:80>
    ServerAdmin This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
    DocumentRoot /home/www/ngiknguk/public_html/blog/images
    ServerName img.blog.pnyet.web.id
    ServerAlias img.blog.pnyet.web.id
    ErrorLog logs/blog-error_log
    CustomLog logs/blog-access_log common
</VirtualHost>

I found a problem when trying to open a file on img.blog.pnyet.web.id example: I just trying opened http://img.pnyet.web.id/networking/ping.png and I get the messages:

[Mon Jan 18 01:44:49 2010] [error] [client 114.56.164.60] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Mon Jan 18 01:44:49 2010] [error] [client 114.56.164.60] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

I've .htaccess for RewriteCond and RewriteRule configuration, please see below:

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

# END WordPress

I'm so tired today, I need to take a rest. Maybe I'll moving img.blog.pnyet.web.id root folder to other place, and hopefully the problem should be solve.

+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:):grin;)8):p:roll:eek:upset:zzz:sigh:?:cry
:(:x
 
Please input the anti-spam code that you can read in the image.
+/- Comments
Add New Search RSS

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."