1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Simple .htaccess help wanted

Discussion in 'PHP' started by kind_of_the_cash, Sep 24, 2008.

  1. #1
    I want to rewrite all links in my current html page this

    file.php?page=Pics-Eggs
    file.php?page=Pics-Cat

    links to

    Pics-Eggs.html
    Pics-Cat.html

    etc.. Hope I get help from you.

    Thanks :D
     
    kind_of_the_cash, Sep 24, 2008 IP
  2. eric_basher

    eric_basher Peon

    Messages:
    185
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    grab this code ;)

    
    RewriteEngine On
    RewriteRule ^([^/]*)\.html$ /?page=$1 [L]
    
    PHP:
     
    eric_basher, Sep 24, 2008 IP
    kind_of_the_cash likes this.
  3. kind_of_the_cash

    kind_of_the_cash Active Member

    Messages:
    852
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    85
    #3
    Thanks I got :)
     
    kind_of_the_cash, Sep 25, 2008 IP
  4. alibak

    alibak Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi actually I have a htacces problem also...
    the mod_rewrite is enabled in the server...

    but for some reason SEO does not work! nothing that has . HTML works! but if I shut off the SEO, then the links work... of course not in SEO format then...

    for instance:
    www.movies.httplive.com/video/2-test.html (with SEO) which shows as blank page
    www.movies.httplive.com/index.php?task=view&id=2 without SEO that works)

    I know my settings below are totally wrong as I have copied it off of another script that has probably had its own settings!

    could someone be kind enough to help?

    my current settings are :
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^([^-]*)-([^-]*)\.htm$ index.php?page=movie&do=film&film_name=$1&film_id=$2 [L]
    RewriteRule ^([^-]*)-([^-]*)-([^-]*)\.htm$ index.php?page=movie&do=film&film_name=$1&film_id=$2&file_id=$3
    AddHandler application/x-httpd-php5 .php .html html

    thanks.
    Ali
     
    alibak, Sep 25, 2008 IP