11
wtravel
Re: Help!How to protect a page!

An alternative solution than the one previously mentioned would be to use .htaccess in your subfolder /HTMLSERVICES/. This example will not allow anybody to call html files directly in your subfolder. It will redirect them to the main domain (please replace the example domain with your own domain first).
Quote:

# /HTMLSERVICES/.htaccess file..
Options +FollowSymlinks
rewriteengine on
rewriterule ^(.*)\.htm$ http://yourdomain.com/ [r=301,nc]

Now, after you upload the .htaccess file to the subfolder HTMLSERVICES, you will also need to use this redirect rule in the subfolder /crimemapping/. So also create an upload a .htaccess file in that folder.

ATTENTION: in both cases I assume their are not .htaccess files in these directories yet. If there are, then simply add the rule to the existing .htaccess file. Ask if you need help with that.

You will need to find out if the html pages will still be called by your XOOPS page and if that works, you can test calling one of the pages directly.

If it does not work you can simply remove either the redirect rules or .htaccess files you have added.

Regards,

Martijn

12
jpco_122122
Re: Help!How to protect a page!

What shall I put in the .htaccess and with this:
Options +FollowSymlinks.

The HTMLSERVICES is an ALIAS of the IIS Virtual Directory. I've been using XOOPS as an Intranet and all the file of XOOPS was located on my C:\mysql\data\xoops and the link crimemapping itself including top.htm, dummy.htm, intro.htm, buttom.htm was located on Drive D:\MuntinlupaIMS\Web\HTML.

13
wtravel
Re: Help!How to protect a page!

I am not familiar with IIS, but I think you will be able to find something on google on that subject.

You can take a look at:
http://www.webmasterworld.com/forum92/447-2-10.htm

Regards,

Martijn

14
wtravel
Re: Help!How to protect a page!

Did a quick search on it and found out that the code below "may" work in IIS as well.

Options +FollowSymlinks is to make sure ReWrite rules are enabled. Normally it is already enabled in the root.

Try to insert the following 2 lines in a text file, change yourdomain.com to your virtual domain name and save it as .htaccess

Then upload it to your /HTMLSERVICES/ folder.
Quote:

ReWriteEngine on
ReWriteRule ^(.*)\.html$ http://yourdomain.com/ [r=301,nc]
ReWriteRule ^(.*)\.htm$ http://yourdomain.com/ [r=301,nc]

15
wtravel
Re: Help!How to protect a page!

Second: you will also have to do this for the folder /crimemapping/ (if there are no other files in that folder you wish to show to anyone directly).

The same .htaccess file can be uploaded to that subdirectory.

Login

Who's Online

306 user(s) are online (278 user(s) are browsing Support Forums)


Members: 0


Guests: 306


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