Closed Thread Icon

Preserved Topic: .htaccess Express (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21046" title="Pages that link to Preserved Topic: .htaccess Express (Page 1 of 1)" rel="nofollow" >Preserved Topic: .htaccess Express <span class="small">(Page 1 of 1)</span>\

 
Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-07-2001 07:59

In true Anti-Asylum practice (please hold your flogging until the end), I request that someone dump the entire contents of their .htaccess file in here.

I've never seen a native .htaccess file and therefore would have no clue where to begin in it's creation or editing. So, I ask if anyone can either show me one or point me to where I can download a complete one.

*grips frozen porkchop* Bring on the flames...

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 12-07-2001 15:18

Well, that's a loaded request. The problem is that any .htaccess file can be different from any other. It all depends on the purpose for the .htaccess file to begin with -
security? folder options, like error docs? etc.

Here is a tutorial I wrote about using .htaccess for security

I hope this helps.



[This message has been edited by Pugzly (edited 12-07-2001).]

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-07-2001 15:29

my point is to create a 'lost' page when people type an incorrect url and also I want to put 'index.shtml' in the default and make .html file parsable to SSI code....

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-07-2001 18:05

PS: You can see the relevant parts of one .htaccess file I use here:
www.gurusnetwork.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=18&t=000031

Where I proposed I do a follow up to Pugzly's first .htaccess tutorial if anyone would find it of interest (and if anyone has other common additions to the .htaccess file then I'd throw them in too).

Emps


You're my wife now Dave

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-07-2001 19:30

how do I use it?

..because I uploaded it to f2s disguised as a text file and then renamed it to '.htaccess'
but my pages are still not parseing and my "iukvsdv/kenv.html" ain't redirecting to 'lost/index.html' and directories don't automatically refer to 'index.shtml' --so in conclusion, this operation was a no-go...

what am I doing wrong?

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-07-2001 19:43

nevermind... it's just stupid IE and it's stupid "friendly HTTP errors"..

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-07-2001 19:46

PS: So is it working OK now? You lost me a little there!!!

Emps

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-07-2001 19:50

No.... I mean, the error trapping is working now, but it won't parse the SSI or make 'index.shtml' a default page...

does it have anything to do with this line?

AddType application/x-httpd-php .php .php3 .html .shtml


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342


[This message has been edited by Petskull (edited 12-07-2001).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-07-2001 19:57

PS: It might do. The point of the proposed tutorial was to explain what the different bits did but, of course, I'm throwing that to you without any explanation - sorry. From what you've said it looks like you are using server side includes rather than PHP so that line. which basically says 'parse all these file extensions as if they were PHP', could be causing you trouble as it is parsing .shtml pages as PHP and therefore it will break your SSI and pos. cause other problems (I inserted it to make my life easier when I was moving various pages over from .php3 and .shtml versions). So if you aren't using PHP then get rid of that line and see if that helps (you may as well get rid of the source line too).

Emps


You're my wife now Dave

jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 12-07-2001 20:00

Another thing to look for in your overall Apache config is whether it is set to allow overrides in your directory (or all directories by default). It won't parse your .htaccess file unless it is allowed (which I don't think it is by default)...

-jiblet

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-07-2001 20:01

I'm tryin to get stuff like "<!--#echo var="DATE_LOCAL"-->" to work... but it don't know how...

truthfully... I don't care how I get it to work, I just want it to work!!!
(but no php -- ever...)

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 12-07-2001 21:07

It does work if you use a shtml extension, right?


And I do want to do a follow up to the tutorial to talk about groups. Emperor, if you want to do one on redirects and stuff, that would rock!

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-07-2001 22:08

yeah, but what I want to do is keep it as an html file


and I also (as in-on top of that) want-

http://www.kittieporn.com/pugz

to be able to bring up

http://www.kittieporn.com/pugz/index.shtml

know what I mean?


tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-07-2001 22:15

OK I understand I'm not sure you can get server side includes to work in a .html file although there may be a variant of the PHP line I gave (try searching Google or something and I just tried and I got this - give it a go:

code:
AddType text/x-server-parsed-html .html



or have a look at the other resources: www.google.com/search?q=parse+html+shtml+htaccess

esp.: BIG Google URL

To solve the second problem try:

code:
DirectoryIndex index.shtml index.html



That should work.

[edit: big Googel URL]

Emps


You're my wife now Dave

[This message has been edited by Emperor (edited 12-07-2001).]

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-08-2001 00:03

HAHAHA!!

ok... I seem to have fixed the latter example...
trouble is... my computer tries to download it instead of run it...
and tries to save it with no extention, to boot...

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-08-2001 16:30

PS: OK as far as I'm aware the situation now stands that it will accept index.shtml as your default page but it now tries to download it. Right?

So one question: Does it try to do that without this line:

AddType text/x-server-parsed-html .html

I should also say that if that line gets things parsed as shtml then the other line is redundant no?

If it tries to download your .shtml page rather than open it it may be because:

a) In my rush to get home and go to the pub I gave you the wrong line - try looking through the resources in that last post.

b) You may need to change your preferences so that your browser opens .shtml pages (how you do this depends on your OS).

c) Something else is going on - any ideas people.

By the way I've been rushing through the posts and only just noticed this: kittieporn.com? That is borderline offensive.

Emps


You're my wife now Dave

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-09-2001 13:17

According to F2S FAQ, F2S already supports SSI in files with .shtml extension. So, you don't need to add anything to your .htaccess file. Only thing which you may add is DirectoryIndex directive, so that index.shtml is default filename...


Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-09-2001 22:02

it worked!!!
that "AddType text/x-server-parsed-html .html" really did the trick...

it still tries to DL .shtml files, but I am much less concerned about it now....

thanks dO0d!

Hah! Check that l33t speak!


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342


[This message has been edited by Petskull (edited 12-09-2001).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-09-2001 22:39

PS: OK I'm glad that it works and that piece of information has been filed away for future reference. I'm not sure what the problem with it trying to download pages is - if you drop a link to an example page we could see if it is the page or your local settings (or test it on a friends computer).

Emps

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 12-09-2001 23:52

Dumb Q, does the browser try to DL it when you run the page locally, w/o going through a server but not when you run it when it's up on the site?

If that's the case, just hold shift, right-click on the file, choose open with and set the browser of your choise, then it should work.
/Dan


-{ a vibration is a movement that doesn't know which way to go }-

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-10-2001 09:22

it's not really a server problem.... shtml files have always had a netscape icon on my computer..... I've just chosen not to care....


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-11-2001 00:26

btw: im running apache on a win machine. i cant find a .htaccess file. how do i set access-rights.

and what would the setting look like if my root directory and everything else is protected with the same user/password?



« BackwardsOnwards »

Show Forum Drop Down Menu