Solved

Skip a directory with htaccess

Posted on 2012-03-19
1
403 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
[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
1 Comment
 

Accepted Solution

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

was the answer
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

624 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