Solved

different rewrite rules for different apache versions

Posted on 2006-11-29
3
196 Views
Last Modified: 2010-03-04
i have the following rule:
RewriteRule ^Town-([a-z]).htm$ byLetterDisplay.php?mode=Town&letter=$1

this works fine when i upload my htaccess file to my browser which seems to be running a new version of apache.

when running this in easy php it doesnt work.

if i change the ^T to ^t it does but then the uploaded version doesnt work.

someone did mention something to me about how they handle these slightly differently.

can some one give me a work around so it works on both?
0
Comment
Question by:scm0sml
[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
3 Comments
 

Author Comment

by:scm0sml
ID: 18039484
by 'handles these' i mean capitals.
0
 
LVL 27

Accepted Solution

by:
caterham_www earned 300 total points
ID: 18041674
e.g. use a character class [Tt] or use the NC flag to mark the wohle RegEx case-intensive

RewriteRule ^[tT]own-([a-z])\.htm$ byLetterDisplay.php?mode=Town&letter=$1 [L]
0
 
LVL 13

Assisted Solution

by:rhickmott
rhickmott earned 200 total points
ID: 18044085
caterham is correct try the [NC] flag first.

RewriteRule ^Town-([a-zA-Z]).htm$ byLetterDisplay.php?mode=Town&letter=$1 [NC,L]

You can remove the "L" part obviously if its not the last rule.
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

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 your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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