(.htaccess) rewritecond for without extension is not working

Discussion in 'Site & Server Administration' started by abhi10kumar, Jul 9, 2011.

  1. #1
    I create rewritecond for pages without extension, but it is not working..

    Here is the complete code of .htaccess:
    
    PHP Syntax (Toggle Plain Text)
    Options +FollowSymLinks
    Options +Indexes
    RewriteEngine on
     
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
    RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
     
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]*)$ /products.php?pname=$1 [L]
     
    RewriteRule ^([^./]+)/?$ $1.php [L]
    PHP:
     
    abhi10kumar, Jul 9, 2011 IP