htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Domain redirection, URL showed in address bar
PostPosted: 12 Sep 2008 14:06 
Offline

Joined: 12 Sep 2008 14:01
Posts: 2
Dear all,

I have a domain, let's call it mydomain.com
And I have a blog, let's call it myblog.com/myfolder/myslug

As I need people to go to http: //www. myblog.com/myfolder/myslug everytime they type http: //www. mydomain.com, I have edited htaccess and added to the IfModule:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^.*mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.myblog.com/myfolder/myslug? [R=301,L]


And this words great. But in the address bar shows http: //www. myblog.com/myfolder/myslug and I would like it to show http: //www. mydomain.com .. How can I do this???

Thanks a lot in advance!


Top
 Profile  
 
 Post subject: Re: Domain redirection, URL showed in address bar
PostPosted: 12 Sep 2008 14:15 
Offline

Joined: 30 Oct 2006 19:55
Posts: 99
You cant and shouldnt do that. Why don't you just install the blog on mydomain.com?

Or maybe I'm just misunderstanding.. which happens regularly around here. Please explain in more detail what the following quote means..
Quote:
As I need people to go to http: //www. myblog.com/myfolder/myslug everytime they type http: //www. mydomain.com


Sounds like you may need some DNS gurus.


Top
 Profile  
 
 Post subject: Re: Domain redirection, URL showed in address bar
PostPosted: 15 Sep 2008 09:11 
Offline

Joined: 12 Sep 2008 14:01
Posts: 2
yeah, sorry didn't explain correctly:
If you type in your address bar: http://www.mydomain.com I need you to visit http://www.myblog.com/myfolder/myslug
but in the address it should show http://www.mydomain.com and now (with the code I posted before) it is showing http://www.myblog.com/myfolder/myslug

Can I do that using htaccess?? Should I go for DNS advice? .. please hlep, I'm such a newbie :(

Cannot move everything to http://www.mydomain.com, it does not exist physically.

Thanks in advance!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB