Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Sub-domain redirection and MVC style app

11:13 am on Jun 29, 2013 (gmt 0)

Junior Member

10+ Year Member

joined:June 30, 2009
posts: 74
votes: 0

Hi Guys,

I've been on Google and I just can't get this to work.

Here's the sort of thing I'm looking to do:

This is your normal URL: http://example.com/games/loadgame/seo-title/input-2, where "games" is a controller, "loadgame" is the function, "seo-title" is a function input, and "input-2" is the second function input.

However, the URL's that I'm after look like this:


So that "games/loadgame", the controller and function, are not included in the URL. And seo-title becomes the sub-domain.

Is this possible?

Thanks in advance,

[edited by: phranque at 11:39 am (utc) on Jun 29, 2013]
[edit reason] Please Use Example.com [webmasterworld.com] [/edit]

3:47 am on July 14, 2013 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 242

in the RewriteRule Pattern you can use capturing groups by surrounding the relevant parts of the url path with parentheses and then back-reference those groups in the Substitution string using $N variables.

RewriteRule Directive: