httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] mod_negotiation: prefer-type cookie? (as prefer-language)
Date Tue, 04 Mar 2008 18:22:51 GMT
On Mon, Mar 3, 2008 at 5:53 PM, Daniel Aleksandersen
<aleksandersen+apache.org@runbox.com>
>  …or maybe it is possible to check for a cookie, and if that fails (meaning
>  no override) than the mod_negotiation process would start. I have no idea
>  how this would look in a .htaccess file.

This might indeed be possible; but it will be complicated. It depends
on exactly how your negotiation is setup, but could look something
like

RewriteCond %{HTTP:Cookie} type=(.+)
RewriteRule (.*) $1%1

That essentially just tags the contents of the type= cookie onto the
end of the URL if it exists.

By the way, as with all complex mod_rewrite stuff, this would be
easier to do in httpd.conf rather than in .htaccess, and it can only
be reasonably debugged by using the RewriteLog.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message