Solved

Skip a directory with htaccess

Posted on 2012-03-19
1
391 Views
Last Modified: 2013-11-19
RewriteCond %{HTTP_HOST} ^(www.)?example\.com$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

Open in new window


So i have this in my htaccess file to take care of the trailing slash problem . It redirects you every time you add a trailing slash on a url.

The issue here is the fact there is one directory and all its subdirectoies where it needs the trailing slash or it breaks. How do I add a exception for a directory like http://www.example.com/com/ and http:///www.example.com/com/sub/?XXXXX to this rule..

the page thats breaking because of the rewrite looks like this

 http:///www.example.com/com/sub/?view=XXXX&layout=XXXXX

thanks
0
Comment
Question by:santoor
1 Comment
 

Accepted Solution

by:
santoor earned 0 total points
ID: 37740113
RewriteCond %{REQUEST_URI} !/com/

was the answer
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

746 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