Note that there are some explanatory texts on larger screens.

plurals
  1. POtrouble with getting my mod_rewrite rules to run
    primarykey
    data
    text
    <p>I have been trying several variations to get my server to redirect - but all seem to fail. :( </p> <p>This is my url: </p> <pre><code>"meaty-monster-bikes.zz-reviews.com/monster-bikes/p1c9.html" </code></pre> <p>Now the data I want to collect in variables is the portion after</p> <pre><code>"meaty-monster-bikes.zz-reviews.com/" </code></pre> <p>so in this case I want "monster-bikes" and "p1c9" </p> <p>Then using the collected variables the server can redirect to:</p> <pre><code>"zz-reviews.com/index.php?p=1&amp;c=9&amp;k=monster-bikes" </code></pre> <p>I have thried this in my <strong>.htaccess</strong> file: </p> <pre><code>Options +SymLinksifOwnerMatch RewriteEngine On RewriteRule ^[\.0-9-a-z]+/([-a-z]+)/p([0-9]+)pg([0-9]+)\.html$ index.php?p=$2&amp;c=$3&amp;k=$1 [NC,QSA,L] </code></pre> <p>I also tried : </p> <pre><code>RewriteCond %{HTTP_HOST} ^[.+].zz-reviews.com/([-a-z]+)/[.+]$ [NC] RewriteRule ^[\.0-9,:\/-a-z]+p([0-9]+)c([0-9]+)\.html$ index.php?p=$1&amp;c=$2&amp;k=%1 [NC,QSA,L] </code></pre> <p>As far as I can see, both should work, but neither do. </p> <p>This is the webpage: </p> <p><a href="http://zz-reviews.com/index.php?p=1&amp;c=9&amp;k=monster-bikes" rel="nofollow">http://zz-reviews.com/index.php?p=1&amp;c=9&amp;k=monster-bikes</a></p> <p>If you click on the Category "Monster Bikes" </p> <p>You will see this url: </p> <p>"<a href="http://meaty-monster-bikes.zz-reviews.com/monster-bikes/p1c9.html" rel="nofollow">http://meaty-monster-bikes.zz-reviews.com/monster-bikes/p1c9.html</a>"</p> <p>The htaccess does not properly redirect. </p> <p>Can anyone see my mistake ? </p> <p>Thanks . </p> <p>.</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