Loading ...
Sorry, an error occurred while loading the content.

Re: [php4india] {Query} Rewriting rule in .htaccess

Expand Messages
  • jerry jerry
    Hi External Redirect .php files to .html files RewriteRule ^(.*) .php$ /$1.html [R=301,L] --- On Sat, 23/2/08, Gangadhara Prasad
    Message 1 of 2 , Feb 28, 2008
    View Source
    • 0 Attachment

      Hi

       

      External Redirect .php files to .html files
      RewriteRule ^(.*)\.php$ /$1.html [R=301,L]


      --- On Sat, 23/2/08, Gangadhara Prasad <lampprogramming@...> wrote:

      From: Gangadhara Prasad <lampprogramming@...>
      Subject: [php4india] {Query} Rewriting rule in .htaccess
      To: "php-gurus" <php-gurus@yahoogroups.com>, "php-list" <php-list@yahoogroups.com>, "php4india" <php4india@yahoogroups.com>, "phpresource" <phpresource@yahoogroups.com>
      Date: Saturday, 23 February, 2008, 8:12 AM

      Hi All,
       
      I am rewriting rule in .htaccess file.I need to convert all .php files with .html extension.
       
       
       
      My code is
         
      Options +FollowSymlinks
      RewriteEngine on
      RewriteRule ^test-([0-9] +)\.html$ test.php?id= $1
       
      if i enter this url in browser "http://localhost/ test/test. php?id=1" i need to show this one in browser "http://localhost/ test/test- 1.html ".But my code is displaying this one only "http://localhost/ test/test. php?id=1"
       
      Can you please help me where can i change my code.
       
      Thanks,
      Gangadhar


      5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.


      Meet people who discuss and share your passions. Join them now.
    Your message has been successfully submitted and would be delivered to recipients shortly.