|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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? Is http://www.example.com/redirect1.php an image, or is it an HTML page? If it's an image, it should become the page's background image. If it's just an HTML page, as I suspect it is, then the browser will try to use it as a background image but fail. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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? |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
"Leif K-Brooks" <eurleif@ecritters.biz> wrote in message news:451b9f7e$0$25777$4d3efbfe@news.sover.net... > 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? > > Is http://www.example.com/redirect1.php an image, or is it an HTML page? > > If it's an image, it should become the page's background image. If it's > just an HTML page, as I suspect it is, then the browser will try to use > it as a background image but fail. It is an html page, is there any workaround to redirect to the html page without the browser failing? |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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? >> Is http://www.example.com/redirect1.php an image, or is it an HTML page? >> >> If it's an image, it should become the page's background image. If it's >> just an HTML page, as I suspect it is, then the browser will try to use >> it as a background image but fail. > > It is an html page, is there any workaround to redirect to the html page > without the browser failing? > I'm sorry, but how should this work? a browser cannot display a html page as background-*image*... |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
I meant is there an alternative way of using the html page as a redirection
apart from using it as a background image? "jojo" <jojo.hafner@gmx.de> wrote in message news:efghpq$33g$1@registered.motzarella.org... > 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? > >> Is http://www.example.com/redirect1.php an image, or is it an HTML page? > >> > >> If it's an image, it should become the page's background image. If it's > >> just an HTML page, as I suspect it is, then the browser will try to use > >> it as a background image but fail. > > > > It is an html page, is there any workaround to redirect to the html page > > without the browser failing? > > > I'm sorry, but how should this work? a browser cannot display a html > page as background-*image*... |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
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? >>>>> >>>> Is http://www.example.com/redirect1.php an image, or is it an HTML >>>> page? >>>> If it's an image, it should become the page's background image. If it's >>>> just an HTML page, as I suspect it is, then the browser will try to use >>>> it as a background image but fail. >>> It is an html page, is there any workaround to redirect to the html page >>> without the browser failing? >>> >> 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. The redirection works, no matter how is called. You can call it via the browsers address-bar, via any HTML.code, it doesn't matter. the browser just recognises that something or somebody wants to get the file and sends the file you redirect to instead of the file which the browser (or whatever wanted to get the file) wanted to have... quite simple, I hope my explanation wasn't that complicated.. HTH, jojo BTW: please make sure that your posting goes *behind* the quote, makes reading simpler if you can read from the top to the bottom instead of the way round... thank you! And please try to configure your OE better, look at the terrible quotes in your posts... or, would even be better, don't use OE... thanks again ;-) |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
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? >>>>> >>>> Is http://www.example.com/redirect1.php an image, or is it an HTML >>>> page? >>>> If it's an image, it should become the page's background image. If it's >>>> just an HTML page, as I suspect it is, then the browser will try to use >>>> it as a background image but fail. >>> It is an html page, is there any workaround to redirect to the html page >>> without the browser failing? >>> >> 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. The redirection works, no matter how is called. You can call it via the browsers address-bar, via any HTML.code, it doesn't matter. the server just recognises that something or somebody wants to get the file and sends the file you redirect to instead of the file which the browser (or whatever wanted to get the file) wanted to have... quite simple, I hope my explanation wasn't that complicated.. HTH, jojo BTW: please make sure that your posting goes *behind* the quote, makes reading simpler if you can read from the top to the bottom instead of the way round... thank you! And please try to configure your OE better, look at the terrible quotes in your posts... or, would even be better, don't use OE... thanks again ;-) |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
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? >>>>> >>>> Is http://www.example.com/redirect1.php an image, or is it an HTML >>>> page? >>>> If it's an image, it should become the page's background image. If it's >>>> just an HTML page, as I suspect it is, then the browser will try to use >>>> it as a background image but fail. >>> It is an html page, is there any workaround to redirect to the html page >>> without the browser failing? >>> >> 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. The redirection works, no matter how is called. You can call it via the browsers address-bar, via any HTML-code, it doesn't matter. the server just recognises that something or somebody wants to get the file and sends the file you redirect to instead of the file which the browser (or whatever wanted to get the file) wanted to have... quite simple, I hope my explanation wasn't that complicated.. HTH, jojo BTW: please make sure that your posting goes *behind* the quote, makes reading simpler if you can read from the top to the bottom instead of the way round... thank you! And please try to configure your OE better, look at the terrible quotes in your posts... or, would even be better, don't use OE... thanks again ;-) |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
"jojo" <jojo.hafner@gmx.de> wrote in message news:efgo0s$899$3@registered.motzarella.org... > 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? > >>>>> > >>>> Is http://www.example.com/redirect1.php an image, or is it an HTML > >>>> page? > >>>> If it's an image, it should become the page's background image. If it's > >>>> just an HTML page, as I suspect it is, then the browser will try to use > >>>> it as a background image but fail. > >>> It is an html page, is there any workaround to redirect to the html page > >>> without the browser failing? > >>> > >> 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. > The redirection works, no matter how is called. You can call it via the > browsers address-bar, via any HTML-code, it doesn't matter. > the server just recognises that something or somebody wants to get the > file and sends the file you redirect to instead of the file which the > browser (or whatever wanted to get the file) wanted to have... quite > simple, I hope my explanation wasn't that complicated.. > HTH, jojo > > BTW: please make sure that your posting goes *behind* the quote, makes > reading simpler if you can read from the top to the bottom instead of > the way round... thank you! > And please try to configure your OE better, look at the terrible quotes > in your posts... or, would even be better, don't use OE... thanks again ;-) my apologies for top posting. Is there a simple example of redirecting to the php file using html , css or any other way? |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Thu, 28 Sep 2006 16:57:06 +0200, jojo <jojo.hafner@gmx.de> wrote:
>BTW: please make sure that your posting goes *behind* the quote, makes >reading simpler if you can read from the top to the bottom instead of >the way round... thank you! >And please try to configure your OE better, look at the terrible quotes >in your posts... or, would even be better, don't use OE... thanks again ;-) Yes, top posting is an almost unforgivable sin, but at least it's worse than double-posting, even when excoriating somebody else for their sins. <snicker!> -- Joe Zeff The Guy With the Sideburns -- Joe Zeff The Guy With the Sideburns Kill as many as you can; I have a morbid love of excess. http://www.lasfs.info http://zeff.us http://www.lasfs.info http://zeff.us |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
Nospam wrote: > I meant is there an alternative way of using the html page as a redirection > apart from using it as a background image? [top-posting snipped] Where did you ever get the bizarre idea that using an HTML page (redirected or not) as a background image would work as a way to redirect the page? It doesn't. As for what a *real* way of doing such a redirect would be, how about maybe redirecting the URL of the *page* itself using .htaccess, rather than of the background image in the CSS? -- Dan |
|
|
|
#13 |
|
Messages: n/a
Hébergeur: |
"Dan" <dan@tobias.name> wrote in message news:1159474329.942960.304600@m7g2000cwm.googlegro ups.com... > > Nospam wrote: > > I meant is there an alternative way of using the html page as a redirection > > apart from using it as a background image? > [top-posting snipped] > > Where did you ever get the bizarre idea that using an HTML page > (redirected or not) as a background image would work as a way to > redirect the page? It doesn't. > > As for what a *real* way of doing such a redirect would be, how about > maybe redirecting the URL of the *page* itself using .htaccess, rather > than of the background image in the CSS? > > -- > Dan My apologies again for the questions, but I what I have is a page linking to a particular image on a certain page, I would like to redirect the link to that image without having to redirect the entire html page, just that little section that is linking to the image to my php file, is this not possible? maybe not with css but something else? |
|
|
|
#14 |
|
Messages: n/a
Hébergeur: |
"Nospam" <nospam@home.com> skrev i meddelandet news:uc_Sg.42785$8V4.40572@newsfe5-win.ntli.net... > > "Dan" <dan@tobias.name> wrote in message > news:1159474329.942960.304600@m7g2000cwm.googlegro ups.com... > > > > Nospam wrote: > > > I meant is there an alternative way of using the html page as a > redirection > > > apart from using it as a background image? > > [top-posting snipped] > > > > Where did you ever get the bizarre idea that using an HTML page > > (redirected or not) as a background image would work as a way to > > redirect the page? It doesn't. > > > > As for what a *real* way of doing such a redirect would be, how about > > maybe redirecting the URL of the *page* itself using .htaccess, rather > > than of the background image in the CSS? > > > > -- > > Dan > > My apologies again for the questions, but I what I have is a page linking to > a particular image on a certain page, I would like to redirect the link to > that image without having to redirect the entire html page, just that little > section that is linking to the image to my php file, is this not possible? > maybe not with css but something else? I guess it is Where is the image? -- Luigi Donatello Asero https://www.scaiecat-spa-gigi.com/it/svezia.html 我居ä½åœ¨ç‘žå…¸ |
|
|
|
#15 |
|
Messages: n/a
Hébergeur: |
"Luigi Donatello Asero" <jaggillarfotboll@telia.com> wrote in message news:_j_Sg.17981$E02.7121@newsb.telia.net... > > "Nospam" <nospam@home.com> skrev i meddelandet > news:uc_Sg.42785$8V4.40572@newsfe5-win.ntli.net... > > > > "Dan" <dan@tobias.name> wrote in message > > news:1159474329.942960.304600@m7g2000cwm.googlegro ups.com... > > > > > > Nospam wrote: > > > > I meant is there an alternative way of using the html page as a > > redirection > > > > apart from using it as a background image? > > > [top-posting snipped] > > > > > > Where did you ever get the bizarre idea that using an HTML page > > > (redirected or not) as a background image would work as a way to > > > redirect the page? It doesn't. > > > > > > As for what a *real* way of doing such a redirect would be, how about > > > maybe redirecting the URL of the *page* itself using .htaccess, rather > > > than of the background image in the CSS? > > > > > > -- > > > Dan > > > > My apologies again for the questions, but I what I have is a page linking > to > > a particular image on a certain page, I would like to redirect the link to > > that image without having to redirect the entire html page, just that > little > > section that is linking to the image to my php file, is this not possible? > > maybe not with css but something else? > > I guess it is > Where is the image? > > -- > Luigi Donatello Asero > https://www.scaiecat-spa-gigi.com/it/svezia.html > ?????? > > The image is on a domain: http://www.example.com/image1.jpg and on the html http://www.example.com/redirect.html I would like to redirect all links to the image (ideally within the window the image occupies) to my php file which is at http://www.example.com/redirect.php , still within my http://www.example.com/redirect.html page. I am unsure which is the best way to go through this |
|
|
|
#16 |
|
Messages: n/a
Hébergeur: |
Nospam wrote: > I would like to redirect all links to the image (ideally within the window > the image occupies) to my php file which is at > http://www.example.com/redirect.php , still within my > http://www.example.com/redirect.html page. I am unsure which is the best > way to go through this You can redirect an image, but only to another image, not an HTML page. It would be all right to redirect it to a PHP document, if what the PHP code does is output an image. Since the place you're referencing the image is as the background image of a section of an HTML page, the only thing that's appropriate to use there is another image. Perhaps what you really are trying to do could be accomplished with a different method, such as an iframe or a server-side include? -- Dan |
|
|
|
#17 |
|
Messages: n/a
Hébergeur: |
"Dan" <dan@tobias.name> wrote in message news:1159528496.769509.67890@h48g2000cwc.googlegro ups.com... > > Nospam wrote: > > I would like to redirect all links to the image (ideally within the window > > the image occupies) to my php file which is at > > http://www.example.com/redirect.php , still within my > > http://www.example.com/redirect.html page. I am unsure which is the best > > way to go through this > > You can redirect an image, but only to another image, not an HTML page. > It would be all right to redirect it to a PHP document, if what the > PHP code does is output an image. Since the place you're referencing > the image is as the background image of a section of an HTML page, the > only thing that's appropriate to use there is another image. > > Perhaps what you really are trying to do could be accomplished with a > different method, such as an iframe or a server-side include? > > -- > Dan > Is there an example of how I could do this with an i-frame or server side include? |
|
![]() |
| Outils de la discussion | |
|
|