SephirGaine Posted August 3, 2006 Share Posted August 3, 2006 Man. This forum has helped me out a ton with my website thus far, much appreciated. One more, (hopefully) quick questions for all your pros.I just want to know how to mask the web address that appears in a web browser. I simply want to show it as my main domain (http://www.iptresources.com) throughout the entire website. I figure it's as simple as adding a script to each page with what I want to show up, however I don't know what script it is or where I should look for it. Thanks for the help -- in advance! Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 3, 2006 Share Posted August 3, 2006 I have only ever seen this done with frames.I do not like this, as if I like one page, I can bookmark that page, or send to a friend. instead of having to go through the whole site againYou can mask your URL in a wayfor examplewww.example.com/index.php?page=mainto bewww.example.com/page/mainor what ever you wantusing Mod Rewrite on a *NIX machine and HTACCESS Quote Link to comment Share on other sites More sharing options...
SephirGaine Posted August 3, 2006 Author Share Posted August 3, 2006 Alright, that's cool. I've give it a shot. The main reason why I wanted to do this (well, I was told to do this anyways), was so that visitors didn't know how I've got the website mapped out. I'm not too concerned with them entering sections they're not supposed to, as they have to have a session open and it expires once they close their browser anyways. I just figured it would be a nice thing to do.. however given the fact that I despise frames I definitely won't go that route. Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 3, 2006 Share Posted August 3, 2006 I like your thinking, i hate frames as well, but I thought I be fair and give you the optionMod Rewrites is easyin the HTACCESS use the followingRewriteEngine Onthen you add the rewrite rulefor exampleRewriteRule ^index.php?page=([a-z]*) page/$1 [L]Where the first bit (index.php?page=([a-z]*) is the real address([a-z]*) means anything that is a lowercase letter onlythen page/$1 is the page you want shown$1 being the ([a-z]*) bitThen linking you would do<a href='/page/main'>Main Page</a>Instead of <a href='/index.php?page=main'>Main Page</a>I think that covers the basic concept of Mod Rewrite Quote Link to comment Share on other sites More sharing options...
vivek Posted September 21, 2006 Share Posted September 21, 2006 HelloI want to know that how can it possible to make a dynamic subdomain using .htaccess file and mod_rewrite ?My idea is,I want to redirect http://subdomain.mydomain.com to http://mydomain.com/redirect.php?id=subdomainHow can this possible in apache's mod rewrite ? Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 21, 2006 Share Posted September 21, 2006 [quote author=vivek link=topic=102800.msg438529#msg438529 date=1158821188]HelloI want to know that how can it possible to make a dynamic subdomain using .htaccess file and mod_rewrite ?My idea is,I want to redirect http://subdomain.mydomain.com to http://mydomain.com/redirect.php?id=subdomainHow can this possible in apache's mod rewrite ?[/quote]You can place a index.php file in the root of the sub domain with something like<?phpheader("Location: http://www.exampel.com/redirect.php?id=x Quote Link to comment 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.