Newbie Help

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

Newbie Help

Postby James65 » Sat Oct 23, 2004 2:47 pm

Hi there,

I'm fairly new to using mod_rewrite so i hope someone can help me :)

I want all directories on my site to forward to info.php, i.e..

mysite.com/james = mysite.com/info.php
mysite.com/david = mysite.com/info.php
mysite.com/chris = mysite.com/info.php

But i don't want php,gif,jpg etc.. files to forward anywhere, so i wrote:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteRule !^(.*)(.gif)|(.php)|(.jpg)$ info.php


This works fine however this then means that my domain also forwards to info.php, i.e.

mysite.com = mysite.com/info.php
mysite.com = mysite.com/info.php

Does anyone know how i could go about stoping the domain forwarding?

Thank in advance for any advise anyone can give me.


Thanks, James
James65
 
Posts: 1
Joined: Sat Oct 23, 2004 2:41 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 14 guests

cron