Welcome to WebmasterWorld Guest from 3.233.226.151

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

mod_rewrite producing Error 500

worked on other server

     
6:29 pm on Dec 13, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 9, 2003
posts:330
votes: 0


I just moved one of my projects from shared hosting to a dedicated server to take care of growing traffic. The KK process is not yet finished, so I can access my new server only by IP address.

The site is completely dynamic, and I use mod_rewrite to have clean urls, so I use the following .htaccess file in the root directory:

---.htaccess------
RewriteEngine On
RewriteRule .* subdir/index.php [L]
------------------

So now matter what you type in the browser bar, the file subdir/index.php should be used to generate the content. This worked very well so far.

On the new server, I get only Error 500 (Internal Server Error), no matter what I type in.

I am not sure, if this is because I now (until the domain is transferred) use the IP address.

When I use the following file, no matter what I type in, the page is redirected, but unfortunately, the Url changes to [IP.ADD.RE.SS...] so the page can not be generated.

---.htaccess------
RewriteEngine On
RewriteRule .* [IP.ADD.RE.SS...] [L]
------------------

Thank you for your help,

--
globay

10:04 pm on Dec 13, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


globay,

I think you've got several questions here...

First, when you get a 500 error, what does your raw server error log say?

Secondly, using an IP address is OK -- it should cause no unexpected problems unless you specifically add your own code to prevent access-by-IP.

Lastly, if you use an external redirect ( [IP.ADD.RE.SS...] ), then the address bar *will* change - that is part of the 'definition' of an external redirect. To avoid that, use:


RewriteRule .* /subdir/index.php [L]

Jim
1:22 am on Dec 14, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 9, 2003
posts:330
votes: 0


Thank you jdMorgan,

somehow, now everything works just fine.