× Here you can get community support related to ReDJ.

Simple redirect to different domain name

  • mradlmaier
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 4 months ago #157 by mradlmaier
Simple redirect to different domain name was created by mradlmaier
Following situation:
I have a Joomla site hosted at somesubdomain.somedomain.com

I have my own domain registered as mydomain.com, pointing to somesubdomain.somedomain.com

So, while this all works fine.

However, I want that in the browser's addressbar the registered domainname appears, which is now NOT the case:
If the user requests mydomain.com, the browser will display the homepage and in the address bar it will correctly display mydomain.com.

When he now clicks any menuitem the first time, Joomla will display the correct page of course,
but with:
somesubdomain.somedomain.com/?index.php/somepage
in the browser.

But my goal is to have
www.mydomain.com/?index.php/somepage

So basically, I want 2 things
  1. have any requests prefix with "www."
  2. have the original host name part replaced with my registered domainname

I was assuming this can be achieved with some simple item in ReDJ, for example:

FromURL: (.*)
ToURL: www.mydomain.com/$0
301 (Moved permanently)

So, if i request any page, what happens is that the browser's addressbar displays www.mradlmaier.com/$0 and because this page certainly doesnt exist, my host providers error page is displayed.

Can anyone please advice?
Or cant this be achieved with ReDJ?

Please Log in or Create an account to join the conversation.

  • mradlmaier
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 4 months ago #158 by mradlmaier
Replied by mradlmaier on topic Re: Simple redirect to different domain name
To see if something more simple works, I created the following item:

FromURL: /index.php/mobile
ToURL: www.mradlmaier.com/index.php/mobile
301 (Moved permanently)

This changes the URL in the address (this is what I want), but I am getting this error:Fehler 310 (net::ERR_TOO_MANY_REDIRECTS

Please Log in or Create an account to join the conversation.

  • mradlmaier
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 4 months ago - 12 years 4 months ago #159 by mradlmaier
Replied by mradlmaier on topic Re: Simple redirect to different domain name
I am really at a loss:

Using .htacces doesnt change the URL in the browser's address bar, but serves the correct pages.

Using ReDJ instead of .htaccess changes the URL in the browser's address bar, but causes this: Error 310 (net::ERR_TOO_MANY_REDIRECTS

Why is something that simple, so complicated to achieve? :sick:
Last edit: 12 years 4 months ago by mradlmaier.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #160 by admin
Hi,
sorry but this is not the best solution for your needs. The correct way is to configure your DNS so that mydomain.com points to the same IP as somesubdomain.somedomain.com. After this, you shoud add a ServerAlias to the somesubdomain.somedomain.com virtualhost configuration.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • mradlmaier
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 4 months ago #161 by mradlmaier
Replied by mradlmaier on topic Re: Simple redirect to different domain name
Luigi,
I have my DNS hosted at united-domains.de. There it points to somesubdomain.somedomain.com, but I changed it to point to the IP instead.

So, where and how do I add a ServerAlias to the somesubdomain.somedomain.com virtualhost configuration???

My provider doesnt have a full-fledged controlpanel, it is bplaced.net.

Can you exactly tell me what I have to ask support stuff to do? I have absolutely no clue what "adding a ServerAlias to the somesubdomain.somedomain.com virtualhost configuration"
means.

My domain name is mradlmaier.com, my host is mradlmaier.bplaced.net

Can you please advice?

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #162 by admin
If you are using an hosting service, try to ask to provider if is possible to create a server alis. I'm not sure, but reading through their FAQ and looking at their service I suppose is not possible.

A solution could be (and it seems also described in the FAQ) to use an iframe in your main site (mradlmaier.com) that embed the 3rd level domain (mradlmaier.bplaced.net). The only problem is the URL in the address bar never changes. Another problem is your main site will never take SEO reputation or pagerank.

I don't know which is your project, but I would like to suggest you to consider a site migration.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.149 seconds