Page 1 of 1
Posted: Wed Nov 17, 2004 9:33 pm
by rehfeld
your ReWriteRule is solid, but you have a problem because your redirecting using a relative url.
the browser thinks its in the directory named hasla/, so it redirects to:
domain.com/hasla/hasla.php?link=foo
but you want:
domain.com/hasla.php?link=foo
correct?
try this:
Code: Select all
RewriteEngine On
RewriteRule ^hasla/(ї^/]+)$ http://%{SERVER_NAME}/hasla.php?link=$1 їR]
this htaccess file should be in your document root
Posted: Wed Nov 17, 2004 10:19 pm
by rehfeld
and you are sure the directory "hasla" does NOT exist?
what happens if you type:
http://domain.com/hasla
and
http://domain.com/hasla/
into your browser?
if the directory does not exist, i dont know why the server would throw a 403 forbidden error. i would expect a 404 error....
do you have any other rewrite rules in the htaccess, or in any other htaccess files anywhere else?
Posted: Thu Nov 18, 2004 1:18 pm
by rehfeld
i dont think you should need any <files directives
what version of apache and OS is the server running?
are you using any subdomains or something like
freehosting.com/~userdir/ ?????????
first, try making the directory hasla, just make it empty
if theres no change, delete it, then:
change the htaccess to this
Code: Select all
RewriteEngine On
RewriteRule ^hasla/(ї^/]+)$ http://%{SERVER_NAME}/hasla.php?link=$1 їL]
that should rewrite it,, but without a redirect(internal rewrite)
if still no work, change htaccess to this:
Code: Select all
RewriteEngine On
RewriteRule ^index\.php$ http://%{SERVER_NAME}/hasla.php?link=$1 їR]
then goto domain.com/index.php, and it should redirect to domain.com/hasla.php
tell me what the results are
Posted: Fri Nov 19, 2004 2:18 pm
by rehfeld
i would talk to your host again.
what your trying to do is very simple, and they have something configured out of the ordinary and they should be able to explain what to do to thier customers.
you could also make a php file in your docroot, and do
phpinfo():
look at the file paths, see if you notice anything that could be causing this.
you could also do
print_r($_SERVER); // pay attention to the doc root and other paths
but again, i think the host should provide some documentation on this, or at least be able to provide you w/ an extrememly basic rewriterule to get you started
Posted: Sat Nov 20, 2004 9:49 am
by timvw
I would say you are not allowed to have rewriterules :p