PDA

View Full Version : Simple Mod Rewrite?


MrApples
04-02-2008, 09:22 PM
I need a rule that will send everything after the '.com/' to a PHP file. I've gotten close but I don't know how to get the variables to work for the original URL and not the URL I'm redirecting to.

http://www.domain.com/blah/blah/blah.html => /script.php?a=blah/blah/blah.html

Thank you in advance if anyone chooses to help.

--------------- Added 1207192781 at 1207192781 ---------------

PS: Another related question

How would I check if a file exists with mod rewrite? I am also stuck on the variable part here.

RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
That line there does that, but I need it to work for a $1 equal to "^([^/\.]+)/?$"

Any help would be greatly appreciated. This is for caching.