.htaccess syntax question

Posted on 2011-05-11
Last Modified: 2012-06-27
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?

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

Open in new window

Question by:Computer Guy
    LVL 17

    Expert Comment

    What file is not found - .htaccess, *.JPEG, ???

    Add a RewriteLog option to generate some trace to help you figure out what is going on.
    LVL 3

    Author Comment

    by:Computer Guy
    the JPEG file was not found.

    Is it in the correct location?
    LVL 17

    Expert Comment

    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.
    LVL 2

    Accepted Solution

    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?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    760 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