Forum Moderators: phranque

Message Too Old, No Replies

big problem with .htaccess

         

gavish

1:41 pm on Oct 1, 2007 (gmt 0)

10+ Year Member



Hello everyone

I have 2 domain names.
domain1.com is the main websie hosted on my hosting package.
domain2.com is the second domain name so its hosted in domain1.com under /domain2.com directory

I use a free file upload script in domain2.com. when I upload something it gives me direct link download exactly like http://domain1.com/domain2.com/663217846 [663217846 - is a random nr]
What I want to do is to edit .htaccess without showing domain1.com in the link.. just domain2.com/663217846

If I create I subdomain upload.domain2.com and to redirect it to domain1.com/domain2.com it will work?

Please help me someone

Thank you

[edited by: jdMorgan at 10:17 pm (utc) on Oct. 3, 2007]
[edit reason] De-linked [/edit]

jdMorgan

9:06 pm on Oct 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the script is generating incorrect links, you need to fix the script.

.htaccess cannot change links that appear on your pages, it can only change the file associated with a previously-requested URL (link). The URL that appears in the browser is the real URL -- The page defines the linked URL.

Jim

gavish

1:28 pm on Oct 3, 2007 (gmt 0)

10+ Year Member



the script does not generate invalid links.. When I upload the script to another webserver I do not must to enter in home directory in my case www, there I just upload files where I want .
I think is something with that www directory

gavish

5:43 pm on Oct 3, 2007 (gmt 0)

10+ Year Member



I found out that .htaccess was disabled.. now I enable it but still doesn't work
"upload script" is uploaded in /www/example.net directory but still
when I upload something is working but when I am trying to download it doesn't work it returns me this error:
Not Found
The requested URL /example.net/w0112/d16/s45/b02c5c5d/www/example.net/download.php was not found on this server.
I dunno understand why download.php was not found because he is located in /www/example.net/ directory

help me please

[edited by: jdMorgan at 10:18 pm (utc) on Oct. 3, 2007]
[edit reason] Examplified. [/edit]

jdMorgan

10:21 pm on Oct 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This may be due to recursion on your redirect or rewrite. Examine your code and make sure the that 'output' URL will not match the pattern for the 'input' URL. If it does, then you will create a loop.

Jim