views:

63

answers:

2

I am wanting to use mod-rewrite for cleaner URL's across my whole site which is going to be really hard, I will have to most likey rename many files/structure.

Would this be possible though if a page currently is like this

www.domain.com/?p=users.online&page=23

to re-write it as

/users/online/page/23

but then also work when there is more periods . in the name like this

www.domain.com/?p=users.online.new&page=23 to

/users/online/new/page/23

Any suggestions? I will probably have to rename some of the files and such to work better and make more sense

A: 

This will sound stupid, but I'd use a super simple Django site that would handle the urls and proxy between your app and the users.

Santi
That would be a very low performance way to solve a problem already fixed by Apache's mod_rewrite module.
Tom Leys
A: 

There isn't any problem with the extra dots.

RewriteRule *(.*)page/(.*)$ /$1page=$2

You simply ignore the bits you don't want and deal only with the relevant variables.

Are the regexes greedy? Will the first .* consume everything?
a paid nerd
yeah, it'll turn everything into the $1 we use after the forward-slash