Solved

different rewrite rules for different apache versions

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now