Jump to content

help with .htaccess (localhost work but online worst)


havide

Recommended Posts

 I have create a working site at localhost but when I upload it to webhost, it's not working, all link broken.

 

This is the site.

 

this is the directory :

288pq1u.png

 

The index.php content is :

<?php
  header('location:home.html'); 
?>

and the .htaccess content is :

RewriteEngine on

RewriteRule ^home.html$ main/home.php?main=home [L]
RewriteRule ^penyakit.html$ main/home.php?main=penyakit [L]
RewriteRule ^review-(.*)\.html$ main/home.php?main=detilgejala&id=$1 [L]
RewriteRule ^solusi.html$ main/home.php?main=solusi [L]
RewriteRule ^proses$ main/home.php?main=prosessolusi [L]
RewriteRule ^bukutamu.html$ main/home.php?main=bukutamu [L]
RewriteRule ^send-contact$ main/main_bukutamu/proses_bukutamu.php [L]
RewriteRule ^about.html$ main/home.php?main=about [L]
RewriteRule ^ensiklopedia.html$ main/home.php?main=ensiklopedia [L]

Options All -indexes

This config work in localhost. Thanks for your attention and respond, it help me so much  and sorry for the topic's title can't edited it. :)

Are you sure your website uses an Apache http server? Run phpinfo() to find out.

 

If it is an Apache server have you made sure the .htaccess is being read? Best way to test this is to add random gibberish into the file. If the .htaccess file is being read then a 500 Internal Server error will be issued.

Are you sure your website uses an Apache http server? Run phpinfo() to find out.

 

If it is an Apache server have you made sure the .htaccess is being read? Best way to test this is to add random gibberish into the file. If the .htaccess file is being read then a 500 Internal Server error will be issued.

 

this is the result, apache 2.0 handler. is't right?

I think the .htaccess file worked and readed because if I put in my .htaccess code :

DirectoryIndex main/home.php 

at first line, it work and my homepage showed, but not the other page because the "RewriteRule".

I think its the apache server version or another thing in 000webhost not giving permission or not compatible to "RewriteRule" because when I change to hostinger with this phpinfo, all my .htaccess work here. ;D

Any Suggestion? btw, thanks Ch0cu3r for your respond, it help. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.