Note that there are some explanatory texts on larger screens.

plurals
  1. POHtaccess rule to make urls like this ?page=1 look like /page/1 in Codeigniter
    primarykey
    data
    text
    <p>This is how my urls currently look:</p> <pre><code>http://mysite.com/?page=1 </code></pre> <p>How can I make this work?:</p> <pre><code>http://mysite.com/page/1 </code></pre> <p>There is a <a href="https://stackoverflow.com/questions/3167741/easiest-way-to-make-pretty-urls-e-g-mysite-page1-rather-than-mysitepage-page1">post</a> on StackOverflow that asks the same question. But the accepted solution isn't working for me. Because I am using Codeigniter and my page results in a 404 perhaps because since the url pattern of a CI site is:</p> <p>domain/controller/method</p> <p>The system is assuming that I am requesting a controller called "page" and a method called "1" both of which of course doesn't exist. Or maybye it's due to a conflict with the other code in my htaccess file (which I downloaded from the CI wiki, it gets rid of index.php and does a few security things). Here is my entire htaccess file:</p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteBase / #Removes access to the system folder by users. Additionally this will allow you to create a System.php controller, 'system' can be replaced if you have renamed your system folder. RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] #When your application folder isn't in the system folder. This snippet prevents user access to the application folder. Rename 'application' to your applications folder name. RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] #Checks to see if the user is attempting to access a valid file, such as an image or css document, if this isn't true it sends the request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] #Pretty urls for pagination links RewriteRule (.*) index.php?page=$1 &lt;/IfModule&gt; </code></pre> <p>The non indented bit is the solution I got from that other SO question that isn't working for me.</p> <p>Any solutions to this CI pagination issue?</p> <hr> <h2>UPDATE</h2> <p>Ok, read some of the docs and now I have this working:</p> <pre><code>http://mysite.com/home/index/2 </code></pre> <p>What would be the htaccess rule to turn that into?:</p> <pre><code>http://mysite.com/page/2 </code></pre>
    singulars
    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.
 

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