Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your .htaccess file should be placed in '/rs' folder, in the same directory where index.php is.</p> <p>I've tried with enabled rewrite log, and what I saw there, when tried to access <code>localhost/test/user</code>:</p> <blockquote> <p>::1 - - [12/Oct/2012:09:53:11 +0400] [localhost/sid#68a898][rid#1cc4d48/initial] (3) [perdir D:/Development/htdocs/test/] strip per-dir prefix: D:/Development/htdocs/test/user -> user</p> <p>::1 - - [12/Oct/2012:09:53:11 +0400] [localhost/sid#68a898][rid#1cc4d48/initial] (3) [perdir D:/Development/htdocs/test/] applying pattern '^/$' to uri 'user'</p> <p>::1 - - [12/Oct/2012:09:53:11 +0400] [localhost/sid#68a898][rid#1cc4d48/initial] (3) [perdir D:/Development/htdocs/test/] strip per-dir prefix: D:/Development/htdocs/test/user -> user ::1 - - [12/Oct/2012:09:53:11 +0400] [localhost/sid#68a898][rid#1cc4d48/initial] (3) [perdir D:/Development/htdocs/test/] applying pattern '^/([a-z]+)$' to uri 'user'</p> <p>::1 - - [12/Oct/2012:09:53:11 +0400] [localhost/sid#68a898][rid#1cc4d48/initial] (3) [perdir D:/Development/htdocs/test/] strip per-dir prefix: D:/Development/htdocs/test/user -> user</p> <p>::1 - - [12/Oct/2012:09:53:11 +0400] [localhost/sid#68a898][rid#1cc4d48/initial] (3) [perdir D:/Development/htdocs/test/] applying pattern '^/([a-z]+)/$' to uri 'user'</p> <p>::1 - - [12/Oct/2012:09:53:11 +0400] [localhost/sid#68a898][rid#1cc4d48/initial] (1) [perdir D:/Development/htdocs/test/] pass through D:/Development/htdocs/test/user </p> </blockquote> <p>From the first line it is clear, that mod_rewrite is stripping beginning '/', and you are getting 'user' instead of '/user'. So, rewrite rules should be written without '/', that is:</p> <pre><code>RewriteEngine On RewriteRule ^$ index.php RewriteRule ^([a-z]+)/?$ index.php?page=$1 </code></pre> <p>Also notice, that I've combined two last rules by writing '/?'. That means '/' symbol at the end of url is optional.</p> <p>In order to turn on rewrite log, set the following in your httd.conf file:</p> <pre><code># # Logging for mod_rewrite # Use RewriteLogLevel 3 only for debug purposes # Normally use RewriteLogLevel 0 # &lt;IfModule rewrite_module&gt; RewriteLogLevel 3 RewriteLog "logs/rewrite.log" &lt;/IfModule&gt; </code></pre> <p>That way log will be created in logs/rewrite.log file. And this is usually the best way to examine what goes wrong.</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. VO
      singulars
      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