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 trying to set up a site which uses code cloned from http://usesthis.com/

My site is at http://hackingtheuniversity.net/

You'll see that each interview post on the site, uses the following URL syntax

http://firstname.lastname.hackingtheuniversity.net

The creator of the original site uses Nginx and has offered the following for how he achieves this syntax

https://gist.github.com/1840543

I've set up wildcard DNS and a ServerAlias of *.hackingtheuniversity.net, but I'm struggling to understand (and find examples) how to port the Nginx rules to modrewrite rules and would appreciate some help.

Thank you.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Something like:

RewriteCond %{HTTP_HOST} ^([0-9a-z+.-]+).hackingtheuniversity.net/?$ [NC] RewriteRule (.*) /interviews/%1.html [L]

should do the trick.

share|improve this answer
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.