Friday 15 February 2013

Unwanted Apache redirect behavior -


My Ubuntu Redirects Address to My Apache Installation on Server 12.04:
  http: / html   

/87.73.120.126

to

  http://90.184.18.96/joomla/index.php/jomsocial   

Address 87.73.120.126 My The server's current IP address was 90.184.18.96, which was a year ago.

My question is: why does it do this? And how do I stop it?

Half a year ago I wanted to request a code at http://90.184.18.96 to redirect http: //90.184. 18.96 / Joomla / Index.fpp / jomsocial I did this by adding this line:

  redirectional permanent / $ http://90.184.18.96/joomla/index.php/ Jomsocial   

file /etc/apache2/apache2.conf

A few days ago I had to solve the current redirect problem Tried to change the line above:

  redirectional permanent / $ http://127.0.0.1/joomla/index.php/jomsocial   

And reboot server. This did not solve the problem! Then I tried to search a global file for string 90.184.18.96 using this command:

  sudo grep 90.184.18.96 / -irn --exclude -dir = {Bin, lib64, opt, sbin, tmp, boot, found + proc, selinux, dev, media, root, srv, lib, mnt, run, sys, mail, log, doc, src, recovery-mode} -color   

In this search, there was some repetition of old cron entries which I also decided to use 127.0.0.1. If this does not help either, can the string be '90.1184.18.96 '? I think it should be somewhere to redirect to that address.

This server runs Joomla from the path / var / www / joomla / . Since this path has not been excluded from my grep-search, therefore any redirection emerging from Joomla should be revealed by grep-search

Two thoughts:

  1. Redirecting to 127.0.0.1 will redirect to the user's machine, not your server if you are only spreading on one server, You should not include the IP of your server (it is not good to use a site with this domain, Ie www.your-domain.com and will be redirected to an IP address). Therefore, the rule should use the variable for host and path% {HTTP_HOST} and% {REQUEST_URI} for hosts.

  2. In addition to httpd.conf you have your rules. Htaccess which resides in the webserver root: and it is a hidden file, so it can be left by your grep, take a look at that too. Be careful with the syntax of .htaccess and httpd.conf.

  3. You are receiving two things with that redirect: point to an installation which is off-route (/ Joomla)) and setting up a separate homepage in Joomla Setting the Homepage Menu item is as easy as marking menu item with a star in the editor, so you can not need a second part.

No comments:

Post a Comment