1
dargosch
Rewrite /xoops/ to / ?
  • 2006/1/10 22:50

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

I am not sure that this is the right forum for this question, ut I am moving a temporaty installation from /xoops to / on a ISP server. I followed the migration guide, but now some of the links that I greated in the contents cannot be found since it assumes the /xoops root dir.

How to I write a rewrite rule that fixes so that these links still work?

The server is Apache 1.3.33.

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/

2
gediminasbyt
Re: Rewrite /xoops/ to / ?

Are you sure you are moving to / on ISP's site? Check the path with 'pwd' and then, after changes are done update mainfile.php with a correct path to xoopsinstall and mysql. Then login to adminside and to be safe update all modules including system, news, etc.

Gediminas

3
dargosch
Re: Rewrite /xoops/ to / ?
  • 2006/1/11 17:24

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Quote:

gediminasbyt wrote:
Are you sure you are moving to / on ISP's site? Check the path with 'pwd' and then, after changes are done update mainfile.php with a correct path to xoopsinstall and mysql. Then login to adminside and to be safe update all modules including system, news, etc.

Gediminas


Hi,

No, I am not moving to / on the ISP site, only to / on the virtual server. So, this is the scenario:

I have a site at http://www.kunibakai.nu. This is non-XOOPS at the moment. I am now creating a XOOPS version of this site, but since I would not want to release it without contents, which other people must provide, I put it in for instance http://www.kunibakai.nu/xoops/.

Then, when the site is finished and ready for release, I move the site to http://www.kunibakai.nu/, following hte steps in the migration quide. However, now I have potentially a lot of links in static contents pages that point to http://www.kunibakai.nu/xoops/images/image1.jpg which is not there anymore. So, I would like then to not manually edit all these links but automatically redirect every request for a file in

http://www.kunibakai.nu/xoops/

to the same file in

http://www.kunibakai.nu/


Say that the acctual path on this server is
/home/kunibakai.nu/public_html/, what would the rewrite rule be?

I have tried

RewriteEngine on
RewriteRule   
(.*)/xoops/(.*)  $1/$2  [R]


But every time I try to access http://www.kunibakai.nu/xoops/, I get a 404 responce,

How do I do this?

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/

4
Clever
Re: Rewrite /xoops/ to / ?
  • 2006/1/11 17:50

  • Clever

  • Just popping in

  • Posts: 81

  • Since: 2004/4/24


The original site is written in html, so if you were to install XOOPS on the same root, it would not be visible unless you typed http://www.kunibakai.nu./index.php in the address bar. This allows you to create the site "behind" your current site, and when you are ready to go "live" with the XOOPS version, simply rename or remove the index.html page and the index.php will be the default.
This saves all the hassle of migrating and such.

5
dargosch
Re: Rewrite /xoops/ to / ?
  • 2006/1/12 8:24

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Quote:

Clever wrote:
The original site is written in html, so if you were to install XOOPS on the same root, it would not be visible unless you typed http://www.kunibakai.nu./index.php in the address bar. This allows you to create the site "behind" your current site, and when you are ready to go "live" with the XOOPS version, simply rename or remove the index.html page and the index.php will be the default.
This saves all the hassle of migrating and such.


That was simple, and effective. I'll use that.

However, I will have to find out how this redirect thing works. Everythig I throw at it seems to return a 404.

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/

6
dargosch
Re: Rewrite /xoops/ to / ?
  • 2006/1/12 9:57

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

If I have a file http://www.kunibakai.nu/index.html and the following .htaccess:


RewriteEngine On
RewriteRule   
^old.htmlindex.html [L]


Then, when I try to access http://www.kunibakai.nu/old.html, I should get http://www.kunibakai.nu/index.html in my web-browser, right?

Well, I am not. I get a

Quote:
Not Found
The requested URL /index.html was not found on this server.


What is wrong? Please..
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/

Login

Who's Online

125 user(s) are online (80 user(s) are browsing Support Forums)


Members: 0


Guests: 125


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits