Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can <em>proxy</em> via <code>mod_rewrite</code> (as long as <code>mod_proxy</code> has been compiled into the server), and this can be done via .htaccess files. Note that <code>RewriteEngine On</code> requires <code>Options FollowSymLinks</code> to be overridable in your .htaccess.</p> <p>The following in your .htaccess file:</p> <pre><code> Options FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_URI} ^/script.php/?www= RewriteRule ^/script.php/?www='([^']+)' http://example.com/$1 RewriteRule ^/(.*) /script.php/?www='$1' [P] </code></pre> <p>The <code>RewriteCond</code> matches your script path with a ?www= argument (if it fails to match no rewrite will take place). The first <code>RewriteRule</code> will match the www= argument and rewrite the <em>visible</em> path of the request. The second <code>RewriteRule</code> will then <em>proxy</em> the request (due to the <strong>[P]</strong> flag) to the script and will get the "content".</p> <p>Note: this has not been tested, but hopefully will get you heading in the right direction to solve the problem. Also if script.php expects optional args <code>&amp;var2=whatever</code> you will probably need to tweak the <code>RewriteCond</code> to match that and store it using parentheses. You can then recall those args using %1. More details can be found in the <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" rel="nofollow" title="mod_rewrite documentation">documentation</a>.</p> <p>Also to help you debug your rewriting you can use:</p> <pre><code>RewriteLog /full/path/to/your/log/file RewriteLogLevel 3 </code></pre> <p><strong>EDIT:</strong> Added the <code>RewriteLog</code> stuff an clarified that the snippet at the top is to be put in the .htaccess file</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.
 

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