Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 04-29-2008, 03:36 PM
mr_bill mr_bill is offline
Hatchling Croc
 
Join Date: Apr 2008
Posts: 9
Default Mod rewrite issue

So I have a small problem I am getting a 500 error with this htaccess and no error if I delete it. For the script to work right it needs this htaccess. Could someone have look at the code a let me know why it doesnt work on hostgator server but fine on others

Code:
# This is a comment because the line starts with the # character.
# Disable a line by commenting it.

DirectoryIndex index.php
Options -Indexes

# These might give you an error if PHP is not installed as a module.
php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value short_open_tag 1


# Delete or comment out these lines if you're getting Internal Server error because your server does not have mod_rewrite.
RewriteEngine On

# For public uploader
RewriteRule ^register/?$ account.php?action=register [L,NC]
RewriteRule ^login/?$ account.php?action=login [L,NC]
RewriteRule ^pupload/?$ public.php [L,NC]
RewriteRule ^pupload/browse(/([0-9]+))?/?$ public.php?action=browse&page=$2 [L,NC]
RewriteRule ^pupload/view/([0-9]+)/?$ public.php?action=view&upload_id=$1 [L,NC]
RewriteRule ^pupload/manage/([0-9]+)/([0-9a-z]+)/?$ public.php?action=manage&upload_id=$1&key=$2 [L,NC]
RewriteRule ^myfiles(/(.*))?$ myfiles.php?folder=$1 [L,NC]
RewriteRule ^upload(/(.*))?$ upload.php?upload_to=$1 [L,NC]
RewriteRule ^members/?$ browse.php [L,NC]
RewriteRule ^members/([0-9]+)/?$ browse.php?page=$1 [L,NC]
RewriteRule ^members/public/?([0-9]+)?/?$ browse.php?public=1&page=$1 [L,NC]
RewriteRule ^members/info/([0-9]+)$ browse.php?action=info&userid=$1 [L,NC]
RewriteRule ^members/browse/([0-9]+)/?(/.+)?$ browse.php?action=browse&userid=$1&folder=$2 [L,NC]
#RewriteRule ^([a-z0-9\_]+)/?$ browse.php?action=browse&username=$1 [L,NC]
Any and all help is appreciated
Reply With Quote
  #2  
Old 04-29-2008, 03:41 PM
mr_bill mr_bill is offline
Hatchling Croc
 
Join Date: Apr 2008
Posts: 9
Default Re: Mod rewrite issue

Sorry had over looked this line

Code:
# These might give you an error if PHP is not installed as a module.
php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value short_open_tag 1

Is it possible this can be done or is this something hostgator doesnt support
Reply With Quote
  #3  
Old 04-29-2008, 04:01 PM
GatorZach
HostGator Guest
 
Posts: n/a
Default Re: Mod rewrite issue

That's exactly what's breaking .htaccess, php_* directives are deprecated, and PHP isn't compiled as a DSO, thus it will break your config. Just comment them out, and put them in php.ini in your public_html folder, and I will globally symlink it for you, just message me your domain name.
Reply With Quote
  #4  
Old 05-12-2008, 05:26 AM
jakeruston jakeruston is offline
Banned User
 
Join Date: Apr 2008
Posts: 71
Default Re: Mod rewrite issue

Were they deprecated in PHP4 or PHP5?
Reply With Quote
  #5  
Old 05-12-2008, 06:51 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,475
Default Re: Mod rewrite issue

Quote:
Originally Posted by jakeruston View Post
Were they deprecated in PHP4 or PHP5?
No, PHP directives do not work in .htaccess because HostGator uses PHPSuExec/SuPHP.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #6  
Old 05-12-2008, 07:07 AM
jakeruston jakeruston is offline
Banned User
 
Join Date: Apr 2008
Posts: 71
Default Re: Mod rewrite issue

Ah okay, thanks for the answer. Didn't know that.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 10:03 PM.