Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
itsmani1
Forum Regular
Posts: 791 Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:
Post
by itsmani1 » Mon Nov 06, 2006 6:22 am
reason for the mod_rewrite is that i want to make pages like /xxxx/xxxx.html etc
just new to reguller expressions
tried this:
^([a-zA-Z]+$\[0-9]+$\(.*).html$) viewtickets.php?ContentID=$2
Code: Select all
need rule that can send
/xxxxxx/111111/abc.html to index.php?cid=111111
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Mon Nov 06, 2006 8:27 am
itsmani1 wrote: tried this:
^([a-zA-Z]+$\[0-9]+$\(.*).html$) viewtickets.php?ContentID=$2
and then what happend?
try to explain your current pattern, e.g.
[0-9]+ matching one or more digit
itsmani1
Forum Regular
Posts: 791 Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:
Post
by itsmani1 » Tue Nov 07, 2006 5:24 am
Code: Select all
^([a-zA-Z]+$\[0-9]+$\(.*).html$) viewtickets.php?ContentID=$2
[a-zA-Z]=> a to z and A to Z
[0-9] => 0 to 9
(.*) => anything will come
.html => ends at .html
timvw
DevNet Master
Posts: 4897 Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium
Post
by timvw » Tue Nov 07, 2006 5:37 am
So why do you have + and $ in the expression??
Btw:
.html means: match any character and then the characters 'html'
\.html means: meatch the characters '.html'
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Tue Nov 07, 2006 6:01 am
timvw wrote: So why do you have + and $ in the expression??
Not only that but all the red parts are not explained.
itsmani1 wrote:
^( [a-zA-Z]+$\ [0-9]+$\ (.*).html$) viewtickets.php?ContentID=$2