Note that there are some explanatory texts on larger screens.

plurals
  1. POhtaccess, one line does not work
    primarykey
    data
    text
    <p>I am using this htaccess file. Everything is working fine except that first RewriteRule. When I open localhost/music/test/ I get a 404 not found error. When I open localhost/music/ or localhost/music/a/b/etc/ it works like it should.</p> <p>Anyone knows what I am doing wrong here?</p> <pre><code>RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\..+$ RewriteCond %{REQUEST_URI} !/$ RewriteRule ^([^/]*)/$ /music/index.php?id=$1 [NC,L,QSA] RewriteRule ^([^/]*)/([^/]*)/$ /music/index.php?id=$1&amp;sid=$2 [NC,L,QSA] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/$ /music/index.php?id=$1&amp;sid=$2&amp;tid=$3 [NC,L,QSA] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/$ /music/index.php?id=$1&amp;sid=$2&amp;tid=$3&amp;fid=$4 [NC,L,QSA] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/$ /music/index.php?id=$1&amp;sid=$2&amp;tid=$3&amp;fid=$4&amp;fiid=$5 [NC,L,QSA] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/$ /music/index.php?id=$1&amp;sid=$2&amp;tid=$3&amp;fid=$4&amp;fiid=$5&amp;siid=$6 [NC,L,QSA] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/$ /music/index.php?id=$1&amp;sid=$2&amp;tid=$3&amp;fid=$4&amp;fiid=$5&amp;siid=$6&amp;seid=$7 [NC,L,QSA] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/$ /music/index.php?id=$1&amp;sid=$2&amp;tid=$3&amp;fid=$4&amp;fiid=$5&amp;siid=$6&amp;seid=$7&amp;eiid=$8 [NC,L,QSA] </code></pre> <p>Could the apache conf or the virtualhost break the htacces file for one line?</p> <p><strong>apache conf is the default conf (apt-get apache2)</strong></p> <p><strong>virtualhost file</strong></p> <pre><code>&lt;VirtualHost *:80&gt; ServerAdmin wouter1994_67@hotmail.com ServerName sites DocumentRoot /var/www/sites &lt;Directory /var/www/sites&gt; Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all &lt;/Directory&gt; ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined &lt;/VirtualHost&gt; </code></pre> <p>Note: the music dir is inside the sites dir</p>
    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