LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2014, 11:36 AM   #1
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Rep: Reputation: Disabled
apache help


Hi All,
We have one local web server on Ubuntu with below old sites.
Code:
http://192.168.107.63/oldsite/
 or 
http://192.168.107.63/oldsite/index.html
Now new site is ready with below URL as same contents as old sites but with some more additional changes and this new site has created using pmwiki edit tool.
Code:
http://192.168.107.63/index.php?n=Newsite.NewsiteHome
Now just we wanted to automatically redirect all requests coming for old sites to the new site. Since I don't have much knowledge with .htaccess for redirecting rules, I requesting your kind help or if there is any otherway without .htaccess also is really appreciated.

Thanks

Last edited by cli; 04-22-2014 at 12:00 PM.
 
Old 04-22-2014, 11:59 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,935

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by cli View Post
Hi All,
We have one local web server on Ubuntu with below old sites.
Code:
http://192.168.107.63/newsite/
 or 
http://192.168.107.63/newsite/index.html
Now another new site also is ready with below URL as same contents as old sites but with some more additional changes and this new site has created using pmwiki edit tool.
Code:
http://192.168.107.63/index.php?n=Newsite.NewsiteHome
Now just we wanted to automatically redirect all requests coming for old sites to the new site. Since I don't have much knowledge with .htaccess for redirecting rules, I requesting your kind help or if there is any otherway without .htaccess also is really appreciated.
...and the VERY FIRST HIT in Google for "how to redirect a url in apache on Linux" is:
http://www.yolinux.com/TUTORIALS/ApacheRedirect.html

....a complete set of options with examples. Did you try to look this up first? Did you look at the Apache documentation?
http://httpd.apache.org/docs/current...remapping.html
 
1 members found this post helpful.
Old 04-22-2014, 12:25 PM   #3
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Original Poster
Rep: Reputation: Disabled
Excellent Guru
Added only below entry to /var/www/oldsite/index.html file in my PC for testing and now it is redirecting successfully.
Code:
<META HTTP-EQUIV="Refresh" Content="0; URL=http://www.pmwiki.org/wiki/Main/WikiSandbox?from=PmWiki.WikiSandbox">
Once again thanks a lot. Let me try the same in real server.

Last edited by cli; 04-22-2014 at 12:27 PM.
 
Old 04-22-2014, 12:31 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,935

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by cli View Post
Excellent Guru
Added only below entry to /var/www/oldsite/index.html file in my PC for testing and now it is redirecting successfully.
Code:
<META HTTP-EQUIV="Refresh" Content="0; URL=http://www.pmwiki.org/wiki/Main/WikiSandbox?from=PmWiki.WikiSandbox">
Once again thanks a lot. Let me try the same in real server.
Glad it worked, but you really need to try looking things up on your own first, rather than letting others do it.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I call-run mysql commands from apache and show the result in apache Glenn D. Linux - Software 1 04-04-2014 02:56 AM
Apache close wait error :Apache stop responding,Server get hangs jsaravana87 Linux - Server 1 06-19-2012 12:49 PM
setting up apache from scratch on a linux machine, apache failed message upon bootup dramous43 Linux - Enterprise 2 01-26-2010 08:53 AM
Apache Webserver on Slackware - Failed to Start Apache - 'no listening sockets .." CCTVGuru Linux - Server 4 10-11-2009 02:14 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 11:53 AM


All times are GMT -5. The time now is 12:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration