homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Sub-domain redirection and MVC style app

5+ Year Member

Msg#: 4588743 posted 11:13 am on Jun 29, 2013 (gmt 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]



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

Msg#: 4588743 posted 3:47 am on Jul 14, 2013 (gmt 0)

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:

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved