.htaccess syntax question

This .htaccess file is located in httpdocs/downloads folder

The test and test2 folders are in httpdocs/downloads/jpg/web folder.

With the attached code, it is stating that the file is not found;

1. What should I do to correct the issue?

Thanks!
RewriteEngine On
RewriteRule ^/?.*(test|test2)/.+/web/[^/]+\.JPE?G$ $0 [NC,L]
RewriteRule ^/?.*/[^/]+\.JPE?G$ image.php?file=$0 [NC]

Open in new window

LVL 3
Computer GuyAsked:
Who is Participating?
 
aliganjeiCommented:
Your question is not clear and I can not what is the URL sent to the server and what do you expect it to do.
May you please give some samples of your input and desired redirection to take place?
0
 
sweetfa2Commented:
What file is not found - .htaccess, *.JPEG, ???


Add a RewriteLog option to generate some trace to help you figure out what is going on.
0
 
Computer GuyAuthor Commented:
the JPEG file was not found.

Is it in the correct location?
0
 
sweetfa2Commented:
Your jpeg rule is giving the destination as the original url passed.

Add a RewriteLog option to generate some trace to help you figure out what is going on.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.