Project

General

Profile

Actions

Bug #201

closed

Host parsing in mod_rewrite

Added by Anonymous over 19 years ago. Updated over 16 years ago.

Status:
Invalid
Priority:
High
Category:
mod_rewrite
Target version:
-
ASK QUESTIONS IN Forums:

Description

Hi, is there any ways to parse Host in mod_rewrite rules? I need to rewrite username.site.com to www.site.com?un=username. Any ideas?

-- valent

Actions #1

Updated by Anonymous over 19 years ago

why not just match "^.*\.site\.com$" (except www.) and rewrite / to /?un=username
and handle "/?un=username" (unless your script care about www. hostname)

-- Xuefer <xuefer

Actions #2

Updated by jan over 19 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

You can just match on HTTP_HOST in your script.

Actions #3

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom