Jump to content

subdomains question


pedrodz

Recommended Posts

part 1: working :)

-----------------

ErrorDocument 404 http://www.domain.com/error.htm

 

RewriteEngine on

RewriteCond %{HTTP_HOST} !^www\.domain\.com?$

RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$

RewriteRule ^$ /index.php?subdomain=%1 [L]

 

http://www.domain.com -- no redirection

http://us.domain.com rewrite to http://www.domain.com/index.php?subdomain=us

http://es.domain.com rewrite to http://www.domain.com/index.php?subdomain=es

... and so on

 

 

part 2: what I need  ???

-----------------------

http://www.domain.com/(*.).htm rewrite to http://www.domain.com/index.php?action=$1

http://us.domain.com/(*.).htm rewrite to http://www.domain.com/index.php?subdomain=us&action=$1

http://es.domain.com/(*.).htm rewrite to http://www.domain.com/index.php?subdomain=es&action=$1

 

some sort of

http://www.domain.com/register.htm rewrite to http://www.domain.com/index.php?action=register

http://us.domain.com/register.htm rewrite to http://www.domain.com/index.php?subdomain=us&action=register

 

Link to comment
https://forums.phpfreaks.com/topic/65446-subdomains-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.