.htaccess tutorial

htaccess Elite


Redirecting to a default script file

Ask your mod_rewrite and Redirection questions here, and get answers!

Redirecting to a default script file

Postby exidon » 17 May 2008 19:57

How would you make it so anytime a file in a given directory is accessed, it automatically redirects you to a script file within the same directory (passing on the name of the file accessed).

In other words, if you went to:
my-site.com/some_folder/some_file.txt

You get forwarded to:
my-site.com/some_folder/some_script.php?file=some_file.txt
exidon
 
Posts: 1
Joined: 17 May 2008 19:53

Return to Redirect or Rewrite Questions



cron