Help needed with a simple command

New to mod_rewrite? This is a good place to start.

Help needed with a simple command

Postby talino » Fri Mar 03, 2006 1:06 am

Hi. I'm just beginning with mod rewrite and I'm having a problem with a simple declaration. I need to redirect the following urls:

www.site.org/tutorials/gi.php
www.site.org/tutorials/exp1.php
www.site.org/tutorials/exp2.php
www.site.org/tutorials/balloon.php

to these:

www.site.org/tutorials/gi/
www.site.org/tutorials/exp1/
www.site.org/tutorials/exp2/
www.site.org/tutorials/balloon/

(these directories all contain their own index.php)

I wrote this:

RewriteEngine on
RewriteRule ^tutorials/([a-z0-9]+)\.php$ tutorials/$1

This works fine with all four adresses, but suddenly the url www.site.org/tutorials/ doesn't work anymore (I get a 404), even if I type www.site.org/tutorials/index.php

Could someone please tell me what's wrong with the declaration?

Thanks a lot.
talino
 
Posts: 1
Joined: Fri Mar 03, 2006 1:01 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 28 guests

cron