[eluser]learning_php[/eluser]
Hi,
i recently purchased a Macbook and i am having a little trouble getting my page links to work. I know its something to do with the way that i have set up my .htaccess file but cannot seem to get it to work and i keep getting 404 errors? I have set up MAMP as i localhost so the Mod_rewite should already be working?
This is what i have for my .htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /websites/mysite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,NC,L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we donít have mod_rewrite installed, all 404ís
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 /index.php
</IfModule>
controller:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" title="wallpaper-theme" href="css/stylesheet2.css" />
<link rel="alternate stylesheet" type="text/css" title="carbon-theme" href="css/stylesheet1.css" />
<!--This script should appear below your LINK stylesheet tags -->
[removed]
/***********************************************
* Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
[removed]
<meta http-equiv="Content-Type" content="text/html; charset=encoding">
<title>HomePage</title>
</head>
<body>
<div id = "container">
<div id = "header">
<div id= "nav">
<div id = "tab">
<div id = "navtext"><p><?php echo anchor('/index', 'Home');?></p></div>
</div>
<div id = "tab">
<div id = "navtext"><p><?php echo anchor('about/About', 'About');?></p></div>
</div>
<div id = "tab">
<div id = "navtext">Work</div>
</div>
<div id = "tab">
<div id = "navtext">Contact</div>
</div>
<div id = "tab">
<div id = "navtext">Blog</div>
</div>
</div>
</div>
<div id = "content">
<div id ="textbox">
<div id ="blogtextbox"></div>
</div>
<div id = "sidetextbox"></div>
</div>
</div>
</body>
</html>