Menambahkan Redirect Di Index.php

 Posted admin

If I put the following line in a index.html file, to make Apache include the index.php file:

visiting the index.html page shows me this:

Why is that? We are number one dank meme remix. Why doesn't it actually include the PHP file?

Jun 12, 2019  @PravindaAmarathunga redirect is one of the elements, but not the only one. Just be sure that protected elements doesnt get outputted at all for unauthorized users; Browser's redirect can be disabled client-side, for example: if the browser doesnt do the redirect and the original page get outputted as normal, what would the user see?

Menambahkan Redirect Di Index.php Mp3

Lalu apa solusi yang harus kita lakukan jika kita ingin redirect http ke https secara otomatis? Jawabannya ada dibawah ini. Cara Redirect HTTP ke HTTPS. Untuk redirect http ke https, sebaiknya dilakukan di sisi server. Tetapi untuk pengguna CPanel, dapat dilakukan dengan menambahkan kode berikut di file.htaccess yang ada di File Manager. Di Kesempatan ini, saya akan menjelaskan tehnik setting pengalihan / forwarding DNS di Mikrotik untuk komputer klien. Anggap saja Anda mempunyai rencana bahwa dalam jaringan komputer warnet Anda tidak memperbolehkan mengakses situs-situs yang 'ga bener', mungkin hal yang paling mudah adalah blokir / filter situs 'ga bener' dengan DNS.

Shoe
60.2k26 gold badges127 silver badges225 bronze badges
Adam WojdaAdam Wojda
3571 gold badge5 silver badges11 bronze badges

3 Answers

As others have noted, most likely you don't have .html set up to handle php code.

Having said that, if all you're doing is using index.html to include index.php, your question should probably be 'how do I use index.php as index document?

In which case, for Apache (httpd.conf), search for DirectoryIndex and replace the line with this (will only work if you have dir_module enabled, but that's default on most installs):

If you use other directory indexes, list them in order of preference i.e.

Glitch DesireGlitch DesireMenambahkan Redirect Di Index.php
10.7k5 gold badges36 silver badges54 bronze badges

As of today (2015, Aug., 1st), Apache2 in Debian Jessie, you need to edit:

And change the order of that line, bringing index.php to the first position:

Dr BecoDr Beco

Menambahkan Redirect Di Index.php Yahoo

7,2426 gold badges42 silver badges62 bronze badges

PHP will work only on the .php file extension.

If you are on Apache you can also set, in your httpd.conf file, the extensions for PHP. You'll have to find the line:

and add how many extensions, that should be read with the PHP interpreter, as you want.

ShoeShoe

Menambahkan Redirect Di Index.php Indonesia

60.2k26 gold badges127 silver badges225 bronze badges

Not the answer you're looking for? Browse other questions tagged phpapacheinclude or ask your own question.