Note that there are some explanatory texts on larger screens.

plurals
  1. POhtaccess Mod Rewrite rule for multiple URLs and PHP $_GET's
    primarykey
    data
    text
    <p>I have these mod rewrite rules in my htaccess file:</p> <pre><code>RewriteEngine On # Displays directory if there is no / on the end of the URL RewriteCond %{REQUEST_URI} !^/admin [NC] RewriteCond %{REQUEST_URI} !^/status [NC] RewriteCond %{REQUEST_URI} !^/customer [NC] # Removes index.php from URL RewriteCond %{THE_REQUEST} /index\.php [NC] RewriteRule ^(.*?)index\.php$ /$1 [L,R=302,NC,NE] # Rewrites /services to be /index.php?id=services RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z0-9-]+)/?$ /index.php?id=$1 [L,QSA] # Rewrites /blog/this-is-a-blog-post to be /index.php?id=blog&amp;slug=this-is-a-blog-post RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z0-9-]+)/([\w-]+)/?$ /index.php?id=$1&amp;slug=$2 [L,QSA] # Rewrites /blog/year2013/month12 to be /index.php?id=blog&amp;year=2013&amp;month=01 RewriteRule ^([a-zA-Z0-9-]+)/year([0-9]+)/month([0-9]+)/?$ /index.php?id=$1&amp;year=$2&amp;month=$3 [L,QSA] # Rewrites /status/123 to be /index.php?id=status&amp;seq=123 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z0-9-]+)/([\w-]+)/?$ /index.php?id=$1&amp;seq=$2 [L,QSA] # Rewrites /status/cat1 to be /index.php?id=status&amp;cat=1 RewriteRule ^([a-zA-Z0-9-]+)/cat([0-9]+)?$ /index.php?id=$1&amp;cat=$2 [L,QSA] </code></pre> <p>the <code>/blog</code> works fine, but <code>/status</code> doesn't. its showing the directory index of even tho there is no directory</p> <p>i basically want:</p> <ol> <li><code>home.php?id=services to look like domain.com/services</code> (this for multiple links/URLs) - <strong>Works fine</strong></li> <li><code>home.php?id=blog&amp;year=2013&amp;month=12</code> to look like <code>domain.com/blog/year2013/month12</code> <strong>Works fine</strong></li> <li><code>home.php?id=blog&amp;slug=this-is-a-blog-post</code> to look like <code>domain.com/blog/this-is-a-blog-post</code> <strong>Works fine</strong></li> <li><code>home.php?id=status&amp;cat=123</code> to be <code>domain.com/status/cat123</code> <strong>Not working</strong></li> <li><code>home.php?id=blog&amp;seq=456</code> to be <code>domain.com/status/456</code> <strong>Not working</strong></li> </ol> <p>as you can see above only numbers 4 and 5 don't work, they are just showing either index of or 404 page not found however there is no directory stored on the web server with a name of <em>status</em></p> <p>how can I fix my code above to get this working as the list above?</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.
 

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