reguller express error

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

reguller express error

Post by itsmani1 »

I am trying to access
/cityguides/GA/Atlanta/
using

Code: Select all

RewriteRule ^cityguides/([A-Z][A-Z])/(.*)/ citytickets.php [nc]
and gets this error:
The requested URL /cityguides/GA/Atlanta/ was not found on this server.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Try with a leading / ?

Code: Select all

RewriteRule ^/cityguides/([A-Z][A-Z])/(.*)/ citytickets.php [nc]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

your A-Z won't match Atlanta, you must incorporate lower case letters as well.
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

Jcart wrote:your A-Z won't match Atlanta, you must incorporate lower case letters as well.
A-z is for GA not for Atlanta
for Atlanta i am using (.*)
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

Kieran Huggins wrote:Try with a leading / ?

Code: Select all

RewriteRule ^/cityguides/([A-Z][A-Z])/(.*)/ citytickets.php [nc]
yes hope this [leading /] will work
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

itsmani1 wrote:
Jcart wrote:your A-Z won't match Atlanta, you must incorporate lower case letters as well.
A-z is for GA not for Atlanta
for Atlanta i am using (.*)
My mistake.
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

Jcart wrote:
itsmani1 wrote:
Jcart wrote:your A-Z won't match Atlanta, you must incorporate lower case letters as well.
A-z is for GA not for Atlanta
for Atlanta i am using (.*)
My mistake.
Well no problem its ok,

thank you
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

its working fine now :)
Post Reply