I have developed a website.On 1 page there is a picture gallery,images are getting uploaded perfectly but as soon as i delete an image,this error comes:
*Forbidden You don't have permission to access /fdccms/backend/project_categories/view_image.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.* Deleting an image is working perfectly on localhost but i don't know the problem with server. In .htaccess also i have included rewriterule:
RewriteRule ^view_image/([^/]*)/?(.*)$ http://fdc-int.com/fdccms/backend/project_categories/view_image.php?id=$1&del=$2
Check your folder permissions. Make sure you have read, write and execute permissions for that folder. (that would be 777)
if it's your .htaccess
, try this:
RewriteRule ^view_image/([^/]*)/?(.*) /backend/project_categories/view_image.php?id=$1&del=$2 [L]
since you said fdccms is your webroot.
either way the $
is un-needed since the .
matches any character.
I guess you have some trouble with your rewriteRule.
Probably ?(.*) does not work as expected. The QUERY_STRING should be added automatically, but sometimes that does not happen. I am not sure, if it does not work, if there is a ? in the Rewrite Target.
so try this:
RewriteRule ^view_image/([^/]*)/ /backend/project_categories/view_image.php?id=$1&del=%{QUERY_STRING} [L]