1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Rep Power

    Change header id to my seo friendly url?

    I was able to create a function that would make an seo friendly url. My question is how do I change:




    Here is my index.php file:
    include_once "templates/head.phtml";
    $scamid = $_GET['scamid'];
    if (isset($scamid))
    include_once "templates/scam.phtml";
    elseif (!isset($scamid)) 
    include_once "templates/home.phtml";
    include_once "templates/footer.phtml";
    Here is my scam.phtml file which should redirect to the seo friendly url above.

    require_once "dbConnection.php"; 
    $query = "select * from bad_words";
    $result = mysql_query($query);
        while ($record = mysql_fetch_assoc($result)) 
        $words_array[] = $record['word'];
    $sql = "SELECT * FROM reported_scams WHERE id=".$_GET['scamid'];
    $rs_result = mysql_query($sql);
    while ($row = mysql_fetch_array($rs_result)) {
    $link = $row['business'];
    require_once "functions/seourls.php";
    $link = generate_seo_link($link, '-', true, $words_array);
    // $siteurl is equal to http://www.example.com/
    //$link is equal to jims-service-center-collission-repair-scam.html
    So how can I use the header function to make this work or mod_rewrite ? Thanks, I'm still a newbie in learning
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Pennsylvania, USA
    Rep Power
    You do all of this in the webserver using something like mod_rewrite.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo