Jump to content

show different url through .htaccess


zohab

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.