PHP to HTML Redirection Problem

jonathanjomalley3348

New Member
YetiShare User
Dec 17, 2013
5
0
0
I installed YetiShare successfully and I am able to upload files. The only problem I have is the rewrite of the .php files to reroute to .html. So if I click on register it take me to register.html and it say file not found but if I change it to register.php it works fine.

I did enable AllowOverride All in my httpd.conf so I am not sure what else I should do here. I know that Mod_Rewrite is enabled.
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Does the .htaccess file exist in the script root and does it match the one supplied with the script download?

After you upload a file, does the url to download it work? This should show whether other mod_rewrite urls are working or not.
 

jonathanjomalley3348

New Member
YetiShare User
Dec 17, 2013
5
0
0
Yes .htaccess is as it was from the original download.

After I upload a file and follow the download link it say page not found. So what shall I do with the mod_rewrite url's?

I have Centos 6 with WHM/cPanel. But I use the shell too.
 

jonathanjomalley3348

New Member
YetiShare User
Dec 17, 2013
5
0
0
This is already in my httpd.conf

Code:
RewriteEngine on
AddType text/html .shtml
Also when I run this command it finds mod_rewrite

Code:
# httpd -l | grep -i rewrite
  mod_rewrite.c
The error message is related to finding file_download.php

Code:
Not Found

The requested URL /file_download.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at x.x.x.x Port 80
The error log shows

Code:
[error] [client x.x.x.x] File does not exist: /usr/local/apache/htdocs/file_download.php, referer: http://x.x.x.x/~xxxx/
The strange thing that this file should not be there. If I put it there I receive Internal Server Error. The path for the public_html where this file exist in and the rest of the script is

Code:
/home/xxxxx/public_html
Any help is really appreciated.
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Hi,

It sounds like your Apache/PHP config somehow. Are you using cPanel and running on the temp path for your hosting? I saw...

http://x.x.x.x/~xxxx/

This may be causing issues and reverting to the default Apache setting /usr/local/apache/htdocs/ instead of your home folder /home/xxxxx/public_html/.

Your host might know more.