Solved

RewriteRule problem

Posted on 2006-11-16
4
458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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). #…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

710 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