Forum Moderators: phranque

Message Too Old, No Replies

regular expression issue

         

dizyn

2:40 pm on Nov 23, 2006 (gmt 0)

10+ Year Member



have a look at this reguller expression:

RewriteRule ^/([a-z]+) /$1.php

i want this to rewrite my url like:
sitename dot com/abouts/
and
sitename dot com/abouts

to

sitename dot com/aboutus.php

but not getting correct result.
any help

Psychopsia

3:12 pm on Nov 23, 2006 (gmt 0)

10+ Year Member



Hi!

Try:

RewriteRule ^([a-z]+)/?$ $1.php [nc]

Find information in the Apache forum [webmasterworld.com].

[edited by: Psychopsia at 3:17 pm (utc) on Nov. 23, 2006]

dizyn

5:50 am on Nov 24, 2006 (gmt 0)

10+ Year Member



please one more favor i need.

I need to access :
site dot com/production/434059/tickets.html

at

site dot com/tickets.php

coopster

4:28 pm on Nov 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Based on the first example given, please offer your best effort and we'll help you refine your expression if it is not working for you.