Welcome Guest, Not a member yet? Register   Sign In
.htaccess and rewrite on mac
#1

[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">
&lt;html&gt;

&lt;head&gt;


&lt;link rel="stylesheet" type="text/css" title="wallpaper-theme" href="css/stylesheet2.css"  /&gt;
&lt;link rel="alternate stylesheet" type="text/css" title="carbon-theme"  href="css/stylesheet1.css" /&gt;

&lt;!--This script should appear below your LINK stylesheet tags --&gt;

[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]
&lt;meta http-equiv="Content-Type" content="text/html; charset=encoding"&gt;

&lt;title&gt;HomePage&lt;/title&gt;
&lt;/head&gt;
    &lt;body&gt;
    
    <div id = "container">
        <div id = "header">
            <div id= "nav">
                <div id = "tab">
            <div id = "navtext"><p>&lt;?php echo anchor('/index', 'Home');?&gt;</p></div>
            </div>
            <div id = "tab">
         <div id = "navtext"><p>&lt;?php echo anchor('about/About', 'About');?&gt;</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>

    
    &lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
.htaccess and rewrite on mac - by El Forum - 02-10-2010, 03:03 AM
.htaccess and rewrite on mac - by El Forum - 02-10-2010, 08:43 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 07:00 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 07:03 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 07:14 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 07:27 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 07:36 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 07:46 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 08:08 AM
.htaccess and rewrite on mac - by El Forum - 02-11-2010, 08:16 AM
.htaccess and rewrite on mac - by El Forum - 02-12-2010, 05:07 AM
.htaccess and rewrite on mac - by El Forum - 02-13-2010, 01:24 PM
.htaccess and rewrite on mac - by El Forum - 05-11-2010, 07:53 AM
.htaccess and rewrite on mac - by El Forum - 05-11-2010, 08:02 AM
.htaccess and rewrite on mac - by El Forum - 05-11-2010, 03:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB