HTACCESS problems

works on localhost, but not on server

Page 1 of 1

11 Replies - 1132 Views - Last Post: 24 December 2010 - 09:45 AM

#1 huzi8t9  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 23
  • View blog
  • Posts: 326
  • Joined: 11-July 07

HTACCESS problems

Posted 23 December 2010 - 10:54 AM

Hey!

I'm having a bit of difficulty with my HTACCESS file. I've been coding my website for about 3-4 months now, using Apache (HTACCESS) to shorten my URLs and make them more user-friendly. All was running smoothly, until it came to uploading the file to the server I'm running on, I just get Error 500.

Here's my HTACCESS file, although I can't see any problems myself

RewriteEngine On

RewriteRule (.*?)\.(INC|inc)\.(PHP|php)$ index.php [L]

RewriteRule ^js.php\/([A-Za-z0-9-_]+)/? js.php?SPEC=$1 [L]

RewriteRule ^profile-badge/([A-Za-z0-9-+]+)\.LG/?$ profilebadge.php?user=$1 [L]

RewriteRule ^logs\/(quickscope|1v1|clan-vs-clan|all)\/(find)/?([A-Za-z0-9-+]+)/?$ logs.php?action=$2&type=$1&id=$3 [L]
RewriteRule ^(quickscope|1v1|clan-vs-clan)\/create/?$ tournaments.php?action=create&type=$1 [L]

RewriteRule ^a5e8eba644fdfcfdb4b9000693550c40/?$ $admin.php [L]
RewriteRule ^a5e8eba644fdfcfdb4b9000693550c40\/ip-activity\/([\d]{1,3})\.([\d]{1,3})\.([\d]{1,3})\.([\d]{1,3})/?$ $admin.php?view=ip-activity&IP=$1.$2.$3.$4 [L]
RewriteRule ^a5e8eba644fdfcfdb4b9000693550c40\/ip-activity\/UsersOnly$ $admin.php?view=ip-activity&filter=users;
RewriteRule ^a5e8eba644fdfcfdb4b9000693550c40\/([A-Za-z0-9-_:+]+)/?$ $admin.php?view=$1 [L]

RewriteRule ^user-chat\/(\d{1,5})\/([A-Za-z0-9]{1,15})/?$ chat.php?private=$1&chatid=$2 [L]
RewriteRule ^user-chat\/(\d{1,5})/?$ chat.php?private=$1 [L]
RewriteRule ^user-chat/?$ chat.php [L]
RewriteRule ^chat/?$ chat_actions.php [L]

RewriteRule ^games\/search\/(.*?)/?$ games.php?action=search&term=$1 [L]
RewriteRule ^games\/view-all\/([A-Za-z0-9]{1})$ games.php?action=view_all&start=$1 [L]
RewriteRule ^games\/([\w:+-]+)\/(comments|info|downloads)/? games.php?identifyer=$1&part=$2 [L]
RewriteRule ^games\/([\w:+-]+)/? games.php?identifyer=$1&part=$2 [L]

RewriteRule ^user\/banned/? users.php?action=banned [L]
RewriteRule ^user\/(in|out)\/([\w:+-]+)/? users.php?action=session&dir=$1&loc=$2 [L]
RewriteRule ^user\/(in|out)\/([\w:+-]+)/?([\w:+-]+)/? users.php?action=session&dir=$1&loc=$2/$3 [L]
RewriteRule ^user\/(in|out)\/([\w:+-]+)/?([\w:+-]+)/?([\w:+-]+)/? users.php?action=session&dir=$1&loc=$2/$3/$4 [L]
RewriteRule ^user\/(in|out)/? users.php?action=session&dir=$1 [L]
RewriteRule ^user\/create$ users.php?action=register [L]
RewriteRule ^user\/view\/([\w:+-]+)/? index.php?viewuser=$1 [L]

RewriteRule ^folder\/trash/? pms.php?action=TRASH [L]
RewriteRule ^folder\/sent/? pms.php?action=SENT [L]
RewriteRule ^folder\/([A-Za-z0-9-]+)/? pms.php?action=folder&folder=$1 [L]
RewriteRule ^inbox/? pms.php?action=INBOX [L]
RewriteRule ^read\/([0-9]{1,5})/? pms.php?action=READ&pmid=$1 [L]
RewriteRule ^send\/([0-9]{1,5})/? pms.php?action=SEND&to=$1 [L]
RewriteRule ^send/? pms.php?action=SEND [L]

RewriteRule ^add\/download\/([0-9]{1,5})/? addDownloads.php?game_id=$1 [L]
RewriteRule ^add\/download/? addDownloads.php [L]

RewriteRule ^editprofile/([A-Za-z0-9-_+]+)/? editprofile.php?user=$1 [L]
RewriteRule ^profile/?$                      profile.php [L]
RewriteRule ^profile/([A-Za-z0-9-_+]+)/?     profile.php?user=$1 [L]

RewriteRule ^profile-content/([A-Za-z-_]+)$ ajax_pages/profile-content.php?TODO=$1 [L]

RewriteRule ^private/([A-Za-z0-9]+)\/27b686f1a5a8cba2cd947ecfcb6384fa\/([A-Za-z0-9]+) ajax_pages/secure.php?get=$1&override=yes&part=$2 [L]
RewriteRule ^private/([A-Za-z0-9]+)/? ajax_pages/secure.php?get=$1 [L]



Thanks for any help, always appreciated



-huzi

This post has been edited by huzi8t9: 23 December 2010 - 10:55 AM


Is This A Good Question/Topic? 0
  • +

Replies To: HTACCESS problems

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 5954
  • View blog
  • Posts: 23,219
  • Joined: 23-August 08

Re: HTACCESS problems

Posted 23 December 2010 - 11:49 AM

Have you checked your PHP and Apache error logs? That's the first place to look to start narrowing this down.
Was This Post Helpful? 0
  • +
  • -

#3 huzi8t9  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 23
  • View blog
  • Posts: 326
  • Joined: 11-July 07

Re: HTACCESS problems

Posted 23 December 2010 - 11:52 AM

View PostJackOfAllTrades, on 23 December 2010 - 05:49 PM, said:

Have you checked your PHP and Apache error logs? That's the first place to look to start narrowing this down.



There are no error log files in my directory :dontgetit:
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3393
  • View blog
  • Posts: 9,590
  • Joined: 08-June 10

Re: HTACCESS problems

Posted 24 December 2010 - 06:08 AM

are you sure your web server is running mod_rewrite at all?
Was This Post Helpful? 0
  • +
  • -

#5 huzi8t9  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 23
  • View blog
  • Posts: 326
  • Joined: 11-July 07

Re: HTACCESS problems

Posted 24 December 2010 - 09:06 AM

View PostDormilich, on 24 December 2010 - 12:08 PM, said:

are you sure your web server is running mod_rewrite at all?


Even if I place an empty htaccess file, it gives me the error 500. Would that happen, should the server not support mod_rewrite?
Was This Post Helpful? 0
  • +
  • -

#6 moopet  Icon User is offline

  • binary decision maker
  • member icon

Reputation: 339
  • View blog
  • Posts: 1,185
  • Joined: 02-April 09

Re: HTACCESS problems

Posted 24 December 2010 - 09:11 AM

If you use phpinfo() it'll tell you what modules are loaded and you can see if mod_rewrite is one of them.
Was This Post Helpful? 0
  • +
  • -

#7 no2pencil  Icon User is online

  • Head MFIC
  • member icon

Reputation: 5066
  • View blog
  • Posts: 26,449
  • Joined: 10-May 07

Re: HTACCESS problems

Posted 24 December 2010 - 09:13 AM

This question has nothing to do with PHP coding. Moving to the correct sub forum : Web Servers & Hosting
Was This Post Helpful? 0
  • +
  • -

#8 huzi8t9  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 23
  • View blog
  • Posts: 326
  • Joined: 11-July 07

Re: HTACCESS problems

Posted 24 December 2010 - 09:16 AM

View Postmoopet, on 24 December 2010 - 03:11 PM, said:

If you use phpinfo() it'll tell you what modules are loaded and you can see if mod_rewrite is one of them.


My phpinfo()

View Postno2pencil, on 24 December 2010 - 03:13 PM, said:

This question has nothing to do with PHP coding. Moving to the correct sub forum : Web Servers & Hosting


Sorry
Was This Post Helpful? 0
  • +
  • -

#9 ShaneK  Icon User is offline

  • require_once("brain.php"); //Fatal error :/
  • member icon

Reputation: 239
  • View blog
  • Posts: 1,224
  • Joined: 10-May 09

Re: HTACCESS problems

Posted 24 December 2010 - 09:17 AM

Your webserver doesn't allow htaccess, contact the administrator.
(This is clear by how even if the file is blank you get an error.)

Yours,
Shane~
Was This Post Helpful? 1
  • +
  • -

#10 huzi8t9  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 23
  • View blog
  • Posts: 326
  • Joined: 11-July 07

Re: HTACCESS problems

Posted 24 December 2010 - 09:18 AM

View PostShaneK, on 24 December 2010 - 03:17 PM, said:

Your webserver doesn't allow htaccess, contact the administrator.
(This is clear by how even if the file is blank you get an error.)

Yours,
Shane~


Thanks a lot, Shane - appreciated!



-huzi
Was This Post Helpful? 0
  • +
  • -

#11 huzi8t9  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 23
  • View blog
  • Posts: 326
  • Joined: 11-July 07

Re: HTACCESS problems

Posted 24 December 2010 - 09:43 AM

To use, or enable the use of htaccess, would this be an added expense?



-huzi
Was This Post Helpful? 0
  • +
  • -

#12 no2pencil  Icon User is online

  • Head MFIC
  • member icon

Reputation: 5066
  • View blog
  • Posts: 26,449
  • Joined: 10-May 07

Re: HTACCESS problems

Posted 24 December 2010 - 09:45 AM

That would be upto your webhost. Either check their TOS, or call customer support.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1