I'm struggling to make following work entirely the way I want it:
In .htaccess:
RewriteCond %{HTTP_HOST} ^(.*)?mydomain.jp [NC]
RewriteCond %{REQUEST_URI} !^/help\.php$ [NC]
RewriteCond %{REQUEST_URI} !^/tips\.php$ [NC]
RewriteRule (.*) http://www.mydomaincom/$1 [R=301,L]
Which translates to:
- every page on the .jp domain is routed to the .com domain
- EXCEPT when the files are:
- help.php (including all variables, e.g. help.php?page=10)
- tips.php (same as help.php)
Now for the latter one I would like to have it even more specific, namely
ONLY for when a certain variable is passed.
I would like it to work ONLY for:
tips.php?tips_page=5
and thus not for tips.php, or tips.php?tips_page=10 (or any other number)
Is that doable somehow ?
You should do something on the line of:
RewriteCond %{QUERY_STRING} ^tips_page=5$
If I'm not wrong, you can't really extract variables; the query string
must be handled as a string.
http://wiki.apache.org/httpd/RewriteQueryString
http://httpd.apache.org/docs/2.2/en/mod/mod_rewrite.html#rewriterule
--
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
--
Best Regards,
Peter
""�lvaro G. Vicario"" <alvaro.NO...@demogracia.com.invalid> wrote in
message news:hcu2s8$tem$1...@news.eternal-september.org...