zohab Posted October 5, 2009 Share Posted October 5, 2009 Hi, I want to show different url to my users when they access my site. example 1.I will call http://www.example.com/blog1 page but user will se http://www.example.com/ in browser 2.I will call http://www.example.com/blog1/user1profile page but user will se http://www.example.com/ in browser Link to comment https://forums.phpfreaks.com/topic/176519-show-different-url-through-htaccess/ Share on other sites More sharing options...
RussellReal Posted October 5, 2009 Share Posted October 5, 2009 impossible.. you're probably gonna be more interested in the HTML's <iframe> or <frameset> tags Link to comment https://forums.phpfreaks.com/topic/176519-show-different-url-through-htaccess/#findComment-930508 Share on other sites More sharing options...
jon23d Posted October 5, 2009 Share Posted October 5, 2009 Perhaps I'm missing something, but why not? RewriteRule ^blog1/?$ /var/www/index-or-whatever.php [QSA,L,NC] Link to comment https://forums.phpfreaks.com/topic/176519-show-different-url-through-htaccess/#findComment-930528 Share on other sites More sharing options...
RussellReal Posted October 5, 2009 Share Posted October 5, 2009 You just said you want 1 url to point to 2 different urls, its impossible You don't use htaccess to keep the url from changing, you use a frame Link to comment https://forums.phpfreaks.com/topic/176519-show-different-url-through-htaccess/#findComment-930534 Share on other sites More sharing options...
cags Posted October 5, 2009 Share Posted October 5, 2009 Hi, I want to show different url to my users when they access my site. example 1.I will call http://www.example.com/blog1 page but user will se http://www.example.com/ in browser 2.I will call http://www.example.com/blog1/user1profile page but user will se http://www.example.com/ in browser This is a common misconception of how mod_rewrite works. The actual purpose of mod_rewrite is the opposite of what your attempting to do. If a user puts http://www.mysite.com/profile/john-smith into their browser, mod_rewrite can be used to point the user towards http://www.mysite.com/profile.php?id=john-smith, but the address in the users Address bar will not change. To disguise a url in the manner you are talking about is done with frames as RusselReal has pointed out. Link to comment https://forums.phpfreaks.com/topic/176519-show-different-url-through-htaccess/#findComment-930655 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.