diff options
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/examplepage.php | 21 | ||||
| -rw-r--r-- | pages/index.html | 8 |
2 files changed, 29 insertions, 0 deletions
diff --git a/pages/examplepage.php b/pages/examplepage.php new file mode 100644 index 0000000..f02d6ec --- /dev/null +++ b/pages/examplepage.php @@ -0,0 +1,21 @@ +<?php + +// Make sure we're in YOURLS context +if( !defined( 'YOURLS_ABSPATH' ) ) { + echo "Try using a URL without the /pages/ part"; + die(); +} + +// Display page content. Any PHP, HTML and YOURLS function can go here. +$url = YOURLS_SITE . '/examplepage'; + +yourls_html_head( 'examplepage', 'Example page' ); + +?> + +<p>This is an example page. Its URL is simply <?php echo $url; ?></p> + +<?php + +yourls_html_footer(); + diff --git a/pages/index.html b/pages/index.html new file mode 100644 index 0000000..cfce37c --- /dev/null +++ b/pages/index.html @@ -0,0 +1,8 @@ +<!-- This page hides the content of the /pages/ directory and sends to YOURLS root --> +<html> +<head> +<meta http-equiv="refresh" content="0;url=../"></head> +<body> +YOURLS has nothing for you to see here. +</body> +</html>
\ No newline at end of file |