I've looked a great deal with this, and attempted several things I located on the web, but observing has labored for me personally.


The Way I could make, once the user visit this site:

http://subdomain.domain.com/

It shows him this site (not redirect):

http://world wide web.domain.com/?x=subdomain


So when the consumer visit this site:

http://subdomain.domain.com/number/

It shows him this site (not redirect):

http://world wide web.domain.com/?x=subdomain&y=number


So when the consumer visit this site:

http://subdomain.domain.com/string/number/

It shows him this site (not redirect):

http://world wide web.domain.com/?x=subdomain&z=string&y=number


Also, subdomain value change and number value change

More information: Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5..2.2635


Please explain the code if you're able to...


Thanks :)

This looks nearly the same as a code request, and never an issue, but I am feeling nice today. Here it is.

RewriteEngine On

RewriteRule ^index2.php - [L]

RewriteCond % !^$ [NC]

RewriteCond % !^(www.)example.com [NC]

RewriteCond % ^(www.)?([^.]+).example.com [NC]

RewriteRule ^([^/]+/)?([^/]+/)? index2.php?x=%2&y$1&z=$2 [L,QSA]

the index2.php is required, since the rewrite could be stuck inside a loop otherwise (You can just include index.php within it, so you don't need to copy code). This is exactly what line 2 is perfect for. Whether it picks up the spinning has already been tried it stop there. Line 3 ensures the rewrite does not occur around the primary domain. Line 4 takes the subdomainname part (world wide web. optional) and puts it in %2. Line 5 select the optional third and fourth folder and uses these combined with subdomainname to produce you would expect url. Observe that the '/' is incorporated within the y and z, because otherwise the rule would need to many parentheses to know easily.