Hi

I am trying to setup my URL rewrites to check for a certain template and if it doesnt exist use a default one

So if I have a URL:
http://www.mysite.co.uk/feed/

I want it to check if feed.php exists and use that if it does, but if it doesn't to use page.php?page=feed instead

This is what I currently have:
Code:
Options +FollowSymlinks
RewriteEngine On

RewriteRule ^([^/.]+)/$ $1.php [L]
RewriteRule ^([^/.]+)/$ page.php?page=$1 [L]


ErrorDocument 404 /404.php
It works fine if feed.php exists, but when it doesn't it defaults straight to my custom 404.php

I know I can specify RewriteRule ^feed/$ feed.php [L] and have a catchall for page.php, but I will have a lot of these and do not want to have to hard code them all

Any help would be much appreciated! =D