Jump to content

[SOLVED] RewriteEngine On causing 403 error?


tpl41803

Recommended Posts

Hi all,

 

Someone helped me out with this short .htaccess issue a while back on this form, and it seems that I never actually solved my problem

 

so here it is again:

 

I wanted to write a script that would replace any broken images -- images that are "not found" -- with a default image that says "image not found" -- the site I work on lists used cars for sale and unfortunately the guy who updates the site doesn't always upload pictures when he lists the new cars in the inventory.

 

Thus, I want this default image to display until he gets around to uploadin the actual images

 

I was directed to do this through .htaccess using the rewrite engine -- here's what I'm using currently:

 

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ /image/noimg.jpg

 

it works perfectly, except that when I log back into my file manager, I am presented with a "403 Error, Access Denied"

 

I have tried several different things to amend this--

 

I've removed the "rewriteengine on" line, and the images don't get replaced ,but the 403 error goes away.

 

also in my .htaccess i have custom redirect pages, they're in there below the rewrite rules:

 

Options -Indexes
ErrorDocument 401 /customerrors/error_401.php
ErrorDocument 403 /customerrors/error_403.php
ErrorDocument 400 /customerrors/error_400.php
ErrorDocument 500 /customerrors/error_500.php
ErrorDocument 404 /customerrors/error_404.php 

 

any help would be appreciated, thank you!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.