url rewriting issue in php

Discussion in 'Programming' started by sundhararajhan, Jun 29, 2008.

  1. #1
    Hi,

    Options +FollowSymLinks
    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* /index.php [L]

    The above is the coding that i have in .htaccess, i code this to control all the pages in the index.php file.
    But when i try to access somethink like http://test.com/firstpage it's goes to firstpage.php instead of index.php.

    Can any one please help.
    Thanks in advance
     
    sundhararajhan, Jun 29, 2008 IP
  2. saurabhj

    saurabhj Banned

    Messages:
    3,459
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Which Querystring parameter you are using? Let me know...
     
    saurabhj, Jun 29, 2008 IP
  3. jmf000

    jmf000 Peon

    Messages:
    46
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Check if you have
    AllowOverride FileInfo
    directive to let rewriting engine work ?
     
    jmf000, Jun 30, 2008 IP
  4. sundhararajhan

    sundhararajhan Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi

    Actually i am redirecting all the controls to index.php. For example if the url is like http://www.test.com/car-images , then in index.php i will get the car-images and depend on the keyword ( here it is car ) i will include the file ( include car.php ).

    Actually in the same hosting i have use wordpress with url rewriting , its working fine.I don't why this url rewriting is not working.

    Thanks in advance
     
    sundhararajhan, Jun 30, 2008 IP