Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's strectly related on how your web server handles requests. If you try to visit url that's not handeled by PHP you won't get it to work. By deafult PHP handles only .php request url (also .php5 and some others).</p> <p>A solution could be to write a rewrite condition that convert your /home/ to index.php?page=home. This assuming you're running Apache Web Server with mod_rewrite enabled and htaccess enabled.</p> <p>So, supposing to normalize your links this way:</p> <pre><code> &lt;div id="navi"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="/pages/home"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/pages/skills"&gt;Skills&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/pages/my_projects"&gt;Projects&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/pages/page=experience"&gt;Experience&lt;/i&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/pages/page=personal"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/pages/page=contact"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>you can write an .htaccess like this, and put it in /pages/ folder:</p> <pre><code> RewriteEngine On RewriteRule ^/pages/(.*)$ /index.php?page=$1 [QSA,L] </code></pre> <p>Beware that every request to /pages/ will be rewrited, so you should write them carefully avoiding rewrite of .css .png and so on... </p> <p>This will effect your request this way:</p> <ol> <li>Apache will recive request for a file in /pages/ named home</li> <li>RewriteRule will detect it with the regexp</li> <li>The rule forces apache to answer with your index.php with the parameter page=home (or whatever the regex has catched)</li> </ol> <p>P.S. Maybe you could be interested in flag P to send request to index.php as a Proxy, but for further infos you should refer to mod_rewrite docs (<a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" rel="nofollow">http://httpd.apache.org/docs/current/mod/mod_rewrite.html</a>)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload