Solved

different rewrite rules for different apache versions

Posted on 2006-11-29
3
197 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

632 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