Afficher un message
Vieux 28/09/2006, 19h13   #10
jojo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: redirect to a php file from htaccess

Nospam wrote:>
>>>>>>> I have a redirect in my htaccess to a php file, however I am trying
>>>>>>> to see if the redirect works from css, by this code
>>>>>>> body{background-image:url(http://www.example.com/redirect1.html);
>>>>>>> should redirect to (http://www.example.com/redirect1.php); but for
>>>>>>> some strange reason doesn't work in the css, does anyone know what
>>>>>>> is wrong?
>>>>>>>
>>>> I'm sorry, but how should this work? a browser cannot display a html
>>>> page as background-*image*...
>>>>
>>> I meant is there an alternative way of using the html page as a
>>> redirection
>>> apart from using it as a background image?
>>>

>> Oh, sorry, I got you wrong than. I guessed that you want to load a
>> random background-image or something like that using that php script. So
>> if I got you right you are searching for a way to load a different
>> document using CSS? or what exactly are you looking for? I do not really
>> understand what you are planning to do, I'm sorry.

<snip>
> Is there a simple example of redirecting to
> the php file using html , css or any other way?
>

why do you need HTML to redirect? use .htaccess:

Redirect permanent /file.html http://www.domain.de/file2.html

or php:

header("Location: http://www.example.com/file2.html");

but it is possible with HTML:

<meta http-equiv="refresh" content="0; URL=file2.html">

But if you can avoid using the "meta-refresh" don't use it. It's some
kind of "dirty" and ASFAIK it does not work with all browsers (but with
the most)

HTH, jojo

  Réponse avec citation
 
Page generated in 0,05762 seconds with 9 queries