Jump to content

URL ReWrite - MonsterGamez.net


luke777

Recommended Posts

My arcade site is based on an arcade script that can be bought at http://www.gamesitescript.com.

 

At the moment the URLs for games are like this :

 

Game name : Space Ace

Game url appears as :http://www.monstergamez.net/game/66661803/Space-Ace.html

 

I need someone to modify the php scripts on my server so that instead game page url being as displayed above it displayed like this

 

 

Game name : Space Ace

Game url appears as :http://www.space-ace.monstergamez.net

 

Does anyone know how i can do this ???

 

Thanks Luke.

Link to comment
Share on other sites

If you are on a *nix based server that supports POSIX 1003.2 regular-expressions...

 

# Rewrite <subdomain>.example.com/<path> to example.com/<subdomain>/<path>
#
# Skip rewrite if no hostname or if subdomain is www
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
# Extract (required) subdomain (%1), and first path element (%3), discard port number if present (%2)
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.example\.com(:80)?<>/([^/]*) [NC]
# Rewrite only when subdomain not equal to first path element (prevents mod_rewrite recursion)
RewriteCond %1<>%3 !^(.*)<>\1$ [NC]
# Rewrite to /subdomain/path
RewriteRule ^(.*) /%1/$1 [L] 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.