Solved

RewriteRule

Posted on 2015-02-21
2
44 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
[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
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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 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