Tuesday, January 19, 2010

[Solved] Problem with RewriteCond and RewriteRule

I've already posted article about problem on my apache web server, details? click here. Yesterday I think the cause is the ACL configuration on apache or virtual host configuration. But today the problem has been solved, and I did mistake on .htaccess.

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

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress

I'm so stupid, if use the script on .htacces I'll not be able to open file directly on directory, Because all of the files will be convert to other links. So, how fixed the problem? I just put new conditional using RewriteCond and disabled RewriteRule on some directories, see below:


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(wp-admin|css|cpstyles|images)/
RewriteRule . /index.php [L]


After put this script:
RewriteCond %{REQUEST_FILENAME} !/(wp-admin|css|cpstyles|images)/
My problem has gone, and case closed!!!

1 comment:

Montgomery said...

Quite often, poor headphones and connecting cables are the cause for the loss of clarity in sound. Most headphones do not convey the details, the dynamics and the bass frequencies of the recordings faithfully. As a result, the music fails to create the impact in the listeners that the artists were striving for.
Monster Beats