Solved

RewriteRule

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

14 Experts available now in Live!

Get 1:1 Help Now