Jump to content

Recommended Posts

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

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.

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.