Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think that you should consider using <strong><a href="http://httpd.apache.org/docs/current/rewrite/rewritemap.html%E2%80%8E" rel="nofollow">RewriteMap</a></strong> to solve your problem.</p> <p>Think of this scenario: An end-user requests <code>view/joe-soap/</code>. RewriteMap would ask the server for the ID of this user, and actually request <code>/view/b2c32b2c782f65be2c299f7b38189a120fd51c89/</code>, based on the response.</p> <p>For this to work, you would need to create a PHP script that accepts the user's name from the URL (as provided by RewriteMap) and then returns the ID of that user. RewriteMap would then allow you to silently request <code>view/index.php?profile_id=&lt;retrieved_use_id_here&gt;</code>.</p> <p>I suggest that you <a href="http://httpd.apache.org/docs/current/rewrite/rewritemap.html%E2%80%8E" rel="nofollow">read through the documentation</a> provided by Apache's website. Here are some more sites that could help you:</p> <ol> <li><a href="http://chrisadams.me.uk/2010/05/24/making-sense-of-rewritemaps-in-apache/" rel="nofollow">Making sense of Rewritemaps in Apache</a></li> <li><a href="http://www.kuplen.at/2009/04/mod_rewrite-with-rewritemap-external-rewriting-program/" rel="nofollow">mod_rewrite with RewriteMap: External Rewriting Program</a></li> <li><a href="http://phpsmd.blogspot.com/2008/09/rewritemap-prg-by-example-using-php-for.html" rel="nofollow">RewriteMap PRG By Example Using PHP For Apache Mod_Rewrite</a></li> </ol> <p><strong>However</strong>: I suggest that, considering that this adds an additional request, you simply use PHP to obtain the ID, and, within in the same request, continue from there (as others have suggested).</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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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