Solved

RewriteRule problem

Posted on 2006-11-16
4
451 Views
Last Modified: 2012-06-21
i've made a simple .htaccess
RewriteEngine on
RewriteRule [0-9].jpg$ index.php?id=$1

on apache 2.0.52, but when i access it i get 403 error...
whats wrong?
0
Comment
Question by:svsvsv
  • 2
4 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 17954230
First try (will match 123234.jpg as well)
RewriteEngine On
RewriteRule ^([0-9]+).jpg$ /index.php?id=$1
0
 

Author Comment

by:svsvsv
ID: 17954234
no it still gives me 403 error for the whole directory (even if i access index.php directly)
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17954306
Then You can't use mod_rewrite in Your .htaccess
Ask administrator(possibly Yourself) to AllowOverride FileInfo for Your WebRoot
Refer http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteengine http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride
0
 
LVL 27

Accepted Solution

by:
caterham_www earned 500 total points
ID: 17954666
> it still gives me 403 error

The option FollowSymlinks is not enabled, which causes this 403. You can enable it with

Options +Followsymlinks

If you recive a 500 internal server error, changes must be made in your httpd.conf.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now