Mod_rewrite

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cma
Forum Newbie
Posts: 3
Joined: Wed Dec 17, 2008 3:52 pm

Mod_rewrite

Post by cma »

Hi,

I have this simple piece of mod_rewrite:

Code: Select all

RewriteEngine on
RewriteCond %{SCRIPT_NAME} !\.php
RewriteRule ^([0-9a-z-A-Z]+)/([0-9a-z-A-Z]+)?$ index.php?page=$2&parent=$1 [L]
RewriteRule ^([0-9a-z-A-Z]+)?$ index.php?page=$1 [L]
 
Anyway what I want to know is how can I get this to work on a Windows server? I have used Apache until now but have recently come up with a case that I have to use Windows. Knowing Microsoft I will probably have to buy something.... I have seen many comercial products for rewriting urls but what I really need is something that will work on all Windows servers, just as mod_rewrite works on all Apache servers (that I know of!).

Just to note wordpress seems to manage this and I don't have a clue how - I have never seen a .htaccess file inside a wordpress installation.

Does anyone have any suggestions?

Thanks
Post Reply