Jump to content

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Open index.php and replace 's' to 'pages'

 

Thanks. This is working. I want to Wiki pages and I will do it. How can I change adress " ?w= " and create Wiki folder ?

 

My codes are :

<?php
            $includeDir = ".".DIRECTORY_SEPARATOR."pages".DIRECTORY_SEPARATOR;
      $includeDefault = $includeDir."home.php";
      
      if(isset($_GET['s']) && !empty($_GET['s']))
      {
      
        $_GET['s'] = str_replace("0", '', $_GET['s']);
        $includeFile = basename(realpath($includeDir.$_GET['s'].".php"));
        $includePath = $includeDir.$includeFile;
        
        if(!empty($includeFile) && file_exists($includePath)) 
        {
          include($includePath);
        }
        else 
        {
        include($includeDefault);
        }

      } 
      else 
      {
        include($includeDefault);
      }
?>
Link to comment
Share on other sites

  • Bronze

I want to Wiki pages and I will do it. How can I change adress " ?w= " and create Wiki folder ?

Well, first to begin with, when you access a page like http://en.wikipedia.org/wiki/Stuff, that wiki in the link is NOT pointing to a folder. These sites are using a technique called URL Rewriting, which cannot be done through PHP, ASP or whatever, but through a proper configuration of the web server (see http://www.smashingmagazine.com/2011/11/02/introduction-to-url-rewriting/ for further reference) I'll point some links for the most used ones:

 

Link to comment
Share on other sites

 

I want to Wiki pages and I will do it. How can I change adress " ?w= " and create Wiki folder ?

Well, first to begin with, when you access a page like http://en.wikipedia.org/wiki/Stuff, that wiki in the link is NOT pointing to a folder. These sites are using a technique called URL Rewriting, which cannot be done through PHP, ASP or whatever, but through a proper configuration of the web server (see http://www.smashingmagazine.com/2011/11/02/introduction-to-url-rewriting/ for further reference) I'll point some links for the most used ones:

 

 

 

Thanks but I think you can't understand me :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.