url rewriting - How to redirect a request to a non existant PHP file to a existing DIR in a clean way? -


About my client asked me to create a web app in PHP, I ended up using Symphony. On distribution, he told me that he has pointed out a software to the hardcod URL with an embedded web view:

www.domain.com/dir/tools.php

Now she wants to show the web app in the web view, but the software is used by about 400 consumers, we can not expect to change the hard coded URL.

How do you feel that I can clear it by:

  • Create www.domain.com/dir/tools.php and use redirection? Which one else?
  • Use the URL rewrite? Any snippet is appreciated, I have no idea to do this.

Apache:

  RewriteRule ^ dir / tools \ .php $ new_page.php [R = 301]  

Edit: As stated, it goes into your .htaccess file. I have more information in the linked mod_rewrite document. Fixed.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -