Solved

Skip a directory with htaccess

Posted on 2012-03-19
1
399 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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.
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…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

821 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