1
moxys
MAINFILE.php
  • 2004/9/9 15:07

  • moxys

  • Just popping in

  • Posts: 4

  • Since: 2004/9/9 1


I have idea to protect mainfile.php by moving the file in a directory protected by .htaccess
What is the best way to do for using XOOPS without problem ?.

2
Dave_L
Re: MAINFILE.php
  • 2004/9/9 15:23

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Replace the contents of mainfile.php with:

require_once('/path/to/protected/dir/mainfile.php'?>


The path specified above is your "real" mainfile.php.

Alternatively, you could leave mainfile.php alone, and add an .htaccess file to the main XOOPS directory:

<Files "mainfile.php">
Deny from all
Files>

3
Stewdio
Re: MAINFILE.php
  • 2004/9/9 15:31

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


I like DaveL's idea better, but you can also try this tip from http://www.xoops-tips.com

I havn't tried either solution, although I don't have any ultra security concerns.

4
DonXoop
Re: MAINFILE.php

I use a combination of tricks. I use the .htaccess trick but bury it in the Apache config (faster than .htaccess). Any attempts are given a Forbidden 403 error and I have a log of it.

I also use a PHP encoder to encrypt the file. The file decrypts fine on the server but a mess to look at any other way. Keep a normal copy of the file somewhere off-server just in case you need to make a change someday. Several encoders out there including free like Turck MMCache.

Might sound paranoid but easy to do once and not worry about it.

5
moxys
Re: MAINFILE.php
  • 2004/9/10 6:20

  • moxys

  • Just popping in

  • Posts: 4

  • Since: 2004/9/9 1


Great. Great reply.

6
moxys
Re: MAINFILE.php
  • 2004/9/10 6:23

  • moxys

  • Just popping in

  • Posts: 4

  • Since: 2004/9/9 1


Thanking you for all.

7
moxys
Re: MAINFILE.php
  • 2004/9/10 6:24

  • moxys

  • Just popping in

  • Posts: 4

  • Since: 2004/9/9 1


Thanking you for all.

Login

Who's Online

439 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 439


more...

Donat-O-Meter

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

Latest GitHub Commits