I cannot really explain what you call them. However, I will give an example. I was on this site and their URLs were:
index.php?page=page-name

They said you can achieve this using PHP scripts. How, exactly?

Recommended Answers

All 6 Replies

One way is to use the $_GET reserved variable.
eg:

index.php?page=$_GET['title'];

You can read more about it at php.net

something along the lines of

if isset($page) {header("Location: /amherst/");
exit; }

however most sites are tending to go the other way
to use mode_rewrite to display the generated url in a person friendly, search engine friendly system.
if you are on an apache server mod_rewrite will do what you intend

can you give any example on this ????

can you give any example on this ????

google webmaster help long dynamic url are not indexed

look it up in your google webmaster account or yahoo webmaster account or msn webmaster account, helpscreens
long dynamic url are not indexed by search engines, the page may not be there tomorrow

if you dont have a webmaster account with some search engine, why **expletive deleted** not

Nahh, I have a Google Account I use lots with my site.

If you need as example, here:
www.darkmyst.org

I will try this once I have the time... with reserved variables.

This could be an example:

<?php
$a= $_REQUEST['page'];

switch($a){
case "home_page":
require_once 'home_page.php';
break;

case "something_else":
require_once 'some_other_file';
//or some code
break;

default: echo ' Nothing here '; break;
}
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.