Jump to content
Phishing - Beware of identity theft... ×
  • 0

Change adress


BerkayAta

Question

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0

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

  • 0
  • 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

  • 0

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.