Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

RewriteRule

Posted on 2015-02-21
2
Medium Priority
?
54 Views
Last Modified: 2015-02-22
I am using modrewrite for SEO purposes but when I try to load an image that exists the rule is blocking the image.

.htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^library/(.*)$ index.php?type=public&section=library&$1 [QSA,L]

Open in new window


So this works, the directory library exists but there is no index so index.php?type=public&section=library&$1 is loaded. However, inside library is a directory called img and the images in that directory won't load. I know it is the rule because if I turn the rule into say ^library/index.php then the images load.
0
Comment
Question by:Robert Saylor
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
Robert Saylor earned 0 total points
ID: 40624142
I think I solved my answer

I added this and the images are loading now.

RewriteRule ^library/img/(.*)$ library/img/$1 [QSA,L]
0
 
LVL 7

Author Closing Comment

by:Robert Saylor
ID: 40624143
solved my own question
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month13 days, left to enroll

971 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