Forum Moderators: phranque

Message Too Old, No Replies

htaccess

         

Trym

4:57 pm on Apr 13, 2004 (gmt 0)

10+ Year Member



My blog is at [mydomain.com...]

I make this show at [mydomain.com...] by adding this line to the htaccess in my public directory:

DirectoryIndex /weblog/index.php

I have done this, but I can't access my other sides.
I try to go to www.mydomain.com/photo and mydomain.com/media nothing happend?

her is my .htaccess

-----------------------
# -FrontPage-
DirectoryIndex /weblog/index.php
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

order deny,allow
deny from all
allow from all

order deny,allow
deny from all

AuthName www.mydomain.com
AuthUserFile /home/username/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/username/public_html/_vti_pvt/service.grp
--------------------------------------------------

someone help please?

jdMorgan

5:15 pm on Apr 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Trym,

Welcome to WebmasterWorld [webmasterworld.com]!

You are denying all access. Delete these lines:


order deny,allow
deny from all
allow from all

order deny,allow
deny from all

I strongly recommend that you do not use any code in .htaccess that you do not fully understand. See Apache mod_access [httpd.apache.org].

Jim

Trym

5:47 pm on Apr 13, 2004 (gmt 0)

10+ Year Member



I have done this, but I can't access my other sides.
I try to go to www.mydomain.com/photo and mydomain.com/media but nothing happend?

Yes, I am a newbie, and I am try to learning this. :-)

lemat

9:11 am on Apr 14, 2004 (gmt 0)

10+ Year Member



when you try to access www.mydomain.com/media/
apache tries to find $DocumentRoot/media/weblog/index.php

try to change from
DirectoryIndex /weblog/index.php
to
DirectoryIndex index.php

and make in top index.php
<?PHP
header("Location: [mydomain.com...]
?>
that should move your browser to the /weblog/ directory

Trym

9:27 am on Apr 14, 2004 (gmt 0)

10+ Year Member



what will display in the adressbar? www.mydomain.com
or www.mydomain.com/weblog?

lemat

10:25 am on Apr 14, 2004 (gmt 0)

10+ Year Member



you should use mod_rewrite to do internal redirect:

put it in .htaccess or httpd.conf

RewriteEngine On
RewriteCond %{REQUEST_URI}!^/(photo¦media¦weblog)/
RewriteRule (.*) weblog/$1 [L]

lemat

10:27 am on Apr 14, 2004 (gmt 0)

10+ Year Member



there is a space before !
I've forget that this forum strips it :(

Trym

11:31 am on Apr 14, 2004 (gmt 0)

10+ Year Member



I get an 500 internal error when I try this in .htaccess

lemat

11:52 am on Apr 14, 2004 (gmt 0)

10+ Year Member



Either you don't have mod_rewrite module or haven't replaced ¦ with solid pipe sign.

But the most important thing is: you haven't even look at your system logs, there will be a short explanation why you have got 500's

Trym

12:03 pm on Apr 14, 2004 (gmt 0)

10+ Year Member




Edit: My solution was to put all files from weblog in to public_html and delete weblog.

And it works

Thanks to all helpers :-)