1
steveb78
removing xoops directory from web address
  • 2010/4/14 15:44

  • steveb78

  • Just popping in

  • Posts: 2

  • Since: 2010/4/14


Hello

Built a site for a radio station. We used Network Solutions to host the site, and they offered Xoops 2.3.2b as an add-on. So far, I have enjoyed using the software, however, when the site went live, the xoops directory is in the web address. How would I get rid of the directory from the url?

The Xoops directory is located in htdocs/xoops1 (this is NS put it).

I have some ideas, but wanted to get feedback before I blow up my site.

http://dock1039.com

Thanks!

Steven

2
Burning
Re: removing xoops directory from web address
  • 2010/4/14 16:41

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

1st step : save your files !

I would proceed like this :
• upload xoops1 and his content on your local machine
• make a backup of your database


2nd step : move your files !

Move your files :
• install a local appli to emulate a web server (example)
• in root folder (/www) create a new directory (for example /xoops232b)
• copy /xoops1 content in /xoops232b


3rd step : prepare and import your database

Before to import your database, be sure you get right paths and urls. Using notepad++ :

Search :
http://dock1039.com/xoops1

and replace by :
http://localhost/xoops232b


And search :
--- your-physical-path/xoops1

and replace by :
C:/wamp/www/xoops232b


Save changes, my-local-database.sql

Now create a new database :
• display PhpMyAdmin administration
• create a new database, for example dock1039
• import my-local-database.sql


4th step : modify www/xoops232b/mainfile.php

All codes, path and url must be changed to work in your local environment.

define'XOOPS_ROOT_PATH''C:/wamp/www/xoops232b' );
    
define'XOOPS_PATH''C:/wamp/www/xoops232b/xoops_lib' );
    
define'XOOPS_VAR_PATH''C:/wamp/www/xoops232b/xoops_data' );
...
    
define'XOOPS_URL''http://localhost/xoops232b' );
...
    
define'XOOPS_DB_HOST''localhost' );
    
define'XOOPS_DB_USER''root' );
    
define'XOOPS_DB_PASS''' );
    
define'XOOPS_DB_NAME''dock1039' );


Now, your website should work on your local machine :
http://localhost/xoops232b


5th step : upgrade your site

Download lastest Full package, Xoops 2.4.4

Read upgrade instructions
Quote:
Upgrading from XOOPS 2.0.* above 2.0.14 and 2.2.* (using the full package)

0. Unpack the archive to your LOCAL computer (e.g. PC) in a temporary directory.
1. Move the "upgrade" folder inside the "htdocs" folder (it's been kept out as it's not needed for full installs) on your local computer
2. Delete htdocs/mainfile.php, htdocs/install/, htdocs/cache/, htdocs/template_c/, htdocs/themes/ and htdocs/uploads/ from the "htdocs" folder on your LOCAL computer
* if you have created XOOPS_TRUST_PATH folder on your server, copy the content of /xoops_lib to that directory, and delete /xoops_lib from the "htdocs" folder on your LOCAL computer
3. Upload the content of the /htdocs folder on your LOCAL computer over your existing files on your server
4. For security considerations, you are encouraged to move directories xoops_lib (for XOOPS libraries) and xoops_data (for XOOPS data) out of Document Root, and change the folder names.
5. Make the directory of xoops_data/ writable; Create and make the directories of xoops_data/caches/, xoops_data/caches/xoops_cache/, xoops_data/caches/smarty_cache/ and xoops_data/caches/smarty_compile/ writable (permission 0777 on Linux).
6. Ensure the server can write to mainfile.php (permission 0777 on Linux)
7. If you have Protector previously installed, open the "mainfile.php" file , and remove the Pre-check and Post-check lines (if they exist):

include XOOPS_TRUST_PATH.'/modules/protector/include/precheck.inc.php' ;
include XOOPS_TRUST_PATH.'/modules/protector/include/postcheck.inc.php' ;

8. Access /upgrade/ with a browser, and follow the instructions
9. Follow the instructions to update your database
10. Write-protect mainfile.php again (permission 0444 on Linux)
11. Delete the "upgrade" folder from your server
12. Update the "system" module from the modules administration interface, other modules are recommended to update as well


If it is your first attempt to upgrade a xoops site, you should do it on a copy.

To copy a local site, move your files (again) !
• copy /xoops232b folder
• rename it, for example /xoops244

Modify your database (again) !
• export dock1039 database
• with Notepad++ search C:/wamp/www/xoops232b and replace by C:/wamp/www/xoops244
• search http://localhost/xoops232b and replace by http://localhost/xoops244
• save, example dock1039_244.sql

Create a new database :
• in PhpMyAdmin, export your local database
• create a new database, for example dock1039_244
• import dock1039_244.sql

Modify xoops244/mainfile.php :
• replace xoops232b by xoops244
• replace database name, dock1039 by dock1039_244

Test it : http://localhost/www/xoops244

Now try to upgrade it !


6th step : upload

Your site is up to date. So upload all files inside /xoops244 to distant server, directly in /www :
• be careful, verify you do not erase important files
• if any, rename index.html in index-original.html

Now you are accustomed :
• create a new database
• import dock1039_244 (modified to work online)
• modify mainfile.php


There are certainly faster, but if you follow these steps, you're sure your site didn't crash.

3
steveb78
Re: removing xoops directory from web address
  • 2010/4/14 20:40

  • steveb78

  • Just popping in

  • Posts: 2

  • Since: 2010/4/14


Thanks!

4
deepak267
Re: removing xoops directory from web address
  • 2010/4/15 10:19

  • deepak267

  • Quite a regular

  • Posts: 352

  • Since: 2008/8/15


if you just want to get rid of your xoops directory from URL, you should be able to change on your hosting.

for example your root should point to

http://dock1039.com/xoops1.


I am using Godaddy and they gave me an option to host multiple sites(domain) on the same server.

hope this helps
Deepak


Login

Who's Online

409 user(s) are online (286 user(s) are browsing Support Forums)


Members: 0


Guests: 409


more...

Donat-O-Meter

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

Latest GitHub Commits