Solved

Skip a directory with htaccess

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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.

738 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