Solved

RewriteRule

Posted on 2015-02-21
2
39 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 6

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 6

Author Closing Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 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

12 Experts available now in Live!

Get 1:1 Help Now