CrazyEngineers
  • Manish

    Manish

    MemberOct 17, 2013

    Rewrite rules not working on localhost

    Hello Friends

    I am badly stuck with following Problem

    I have a Project set up on my localhost in following hierarchy

    www/htdocs/abl

    Now the Problem is I want to rewrite following url :

    #-Link-Snipped-#

    to

    #-Link-Snipped-#

    For this I have written a .htaccess file with following code

    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^([^/]+)/category/([^/]+).html /index.php?file=$1&sub1=category [NC]
    But it is not working, what I am doing wrong here?

    Thanks in advance
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • KenJackson

    MemberOct 20, 2013

    The order of the URLs on the RewriteRule line is backwards. It should be old then new.

    Also, the abl directory is missing from both.
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberOct 25, 2013

    thank you ken for reply

    I had managed to make it work

    There was no need to define directory , if you are working on same directory in which files resides
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register