views:

230

answers:

2

just need a regex to match URLs without http , https, ftp in the beginning. basically i need it for mod rewrite

examples:

www.someurl.com/blah/blah/balh/etc/and/so/on
crazy.something.net/agjja
something.us/index.php?

so i can do

RewriteCond %{REQUEST_URI} URLregexhere
RewriteRule ^URLregexhere$ ping.php?url=$1 [L]
A: 

You want to match everything?

RewriteCond %{REQUEST_URI} !^/?ping\.php
RewriteRule (.*) ping.php?url=$1
Devin Ceartas
A: 

By definition everything that the regex in a RewriteRule is receiving is a URL (since it's fed the URLs for requests, and nothing else), so the match-all regex (.*) is all you need.

Amber