.htaccess code
Code: Select all
RewriteEngine on
RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L]Code: Select all
<html>
<head>
<title>Second mod_rewrite example</title>
</head>
<body>
<p>
The requested page was:
<?php echo $_GET['page']; ?>
</p>
</body>
</html>I can also get different reading from the echo statement also. For example, if I change the "/mime_test/page/software" to "/mime_test/page/hardware" even if the hardware folder doesn't exists it still echoes The requested page was: hardware.
It also does the same if I manually put in /mime_test/index.php?page=software or /mime_test/index.php?page=hardware etc etc. It also doesn't load the index.php from those folders which I also want.
Can somebody please explain what I'm doing wrong?