Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am familiar with modifying htaccess files but my initial attempts to do so continue to fail.

Ultimately, I want to point users to 'imaginary' subdomains (those which do not exist) so that the subdomain can be parsed correctly with PHP and MySQL to find the particular member's information. It is my assumption that MediaTemple has something configured to always check for a true subdomain directory prior to any access so the .htaccess file settings are never touched and in turn just generate errors.

For example:

When somebody goes to www.site.com currently, it shows the parent site including information on how to become a member. Once a person is a member, their 'unique' URl is:

www.site.com?MemberID=12345

ultimately, forcing the member to remember the question mark agent equals can be confusing along with the need to remember the proper capitalization and such.

I would 'like' to achieve the following:

www.12345.site.com

redirects to

www.site.com/index.php?MemberID=12345 (index.php reads the 12345 like a $_GET function to properly lookup the iD, valid and retun response based on that.

I believe we could? achieve the same using information after the hash:

e.g. www.site.com/12345

The issue is we already have other pages using /xxxx to modify client content as well as I don't want to block anybody's ability to simply visit: www.site.com/contact for example as a live link.

(where the site redirects to index, tries to look up memberid = 'contact' and does not find any results).

My .htaccess is currently:

ErrorDocument 404 /404.php Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php RewriteCond %{HTTP_HOST} !^www. RewriteCond %{HTTP_HOST} ^(.+).site.com RewriteRule .* http://site.com/processing_page.php?ID=%1 [L,R]

I would expect based off my needs that typing www.something.site.com I would be redirected to: www.site.com/processing_page.php?something

instead, it just redirects to my mediatemple hosting page (essentially stating no subdomain named 'something' exists.

I am running our server on a Media Temple DV 3.5 server running CentOS5 and LAMP stack.

share|improve this question
add comment

1 Answer

Sorry to hear about your issues. If you are still having issues, I'd recommend contacting our tech support and taking a look at our wiki on specific rules.

http://wiki.mediatemple.net/w/%28dv%29:Rewrite_rules

If you open up a support request, feel free to contact us through our Twitter or phone support.

share|improve this answer
    
@user59612 - I appreciate the link, however these types of actions are outside of the scope of media temple support as we have already tried that route previously. –  JM4 Feb 23 '11 at 0:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.