luke777 Posted June 18, 2007 Share Posted June 18, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/ Share on other sites More sharing options...
Caesar Posted June 18, 2007 Share Posted June 18, 2007 Nevermind...re-read. Using subdomains. You can use mod_rewrite if you're on an Apache server. Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-277049 Share on other sites More sharing options...
luke777 Posted June 18, 2007 Author Share Posted June 18, 2007 Ok could you show me exactly how i could do this ! Thanks Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-277052 Share on other sites More sharing options...
Caesar Posted June 18, 2007 Share Posted June 18, 2007 Yes, I saw the subdomains. Reread my post. You can use something like the Apache mod_rewrite Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-277053 Share on other sites More sharing options...
luke777 Posted June 18, 2007 Author Share Posted June 18, 2007 This is my current HTA access code RewriteEngine on RewriteCond %{HTTP_HOST} ^monstergamez.net [NC] RewriteRule ^(.*)$ http://www.monstergamez.net/$1 [L,R=301] RewriteEngine on RewriteRule ^(.*)\.html$ index.php?params=$1 [L] Redirect 301 http://monstergamez.net http://www.monstergamez.net Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-277054 Share on other sites More sharing options...
luke777 Posted June 18, 2007 Author Share Posted June 18, 2007 this topic appears to be sinking so im bring it back to the top otherwise ill never get a response ??? Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-277200 Share on other sites More sharing options...
teng84 Posted June 18, 2007 Share Posted June 18, 2007 http://www.monstergamez.net/game/66661803/Space-Ace.html are saying replace this http://www.monstergamez.net/game/66661803/Space-Ace.html to this games??? i dont know it its possible but u can have this http://www.monstergamez.net/game/arcadegames by simply using the index.php file Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-277202 Share on other sites More sharing options...
Caesar Posted June 19, 2007 Share Posted June 19, 2007 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] Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-277228 Share on other sites More sharing options...
luke777 Posted June 20, 2007 Author Share Posted June 20, 2007 i put this into my HTAcess file but still when i visit game pages the url doesnt change for example when i visit : http://www.monstergamez.net/game/99991281/Extra-Lines.html should be Extra-Lines.monstergamez.net Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-278505 Share on other sites More sharing options...
luke777 Posted June 21, 2007 Author Share Posted June 21, 2007 Sum1 help Quote Link to comment https://forums.phpfreaks.com/topic/56097-url-rewrite-monstergameznet/#findComment-279625 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.