kee2ka4 Posted June 11, 2008 Share Posted June 11, 2008 I have no idea what I have done wrong here, its took my 3 whole days and I still don't have a clue. Here is my weblink, http://www.kingket.com/tumblelog/ The above link only loads if I manually put in the forward slash at the end of the tumblelog directory, but if I remove the last forward slash, then I get the following error: Bad Request Your browser sent a request that this server could not understand. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. I have figured out that the .htaccess file in the tumblelog directory is creating the problem cause when I remove the file, it automatically places the forward slash. But I need the code in .htaccess for userfriendly urls. Here is the code I have in the .htaccess file: RewriteEngine On RewriteRule !(\.gif|\.png|\.jpe?g|\.css|\.js|\.php|^public/.*)$ /index.php [nocase,last] One more thing also I have noticed that my redirect_to function doesn't redirect the user corrently, so say if I login and press the submit button, it doesn't redirect the user to the appropriate page. I have to manually enter the link and then it works. All this works fine on my localhost. Could someone please help me out here.. Thanks Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted June 11, 2008 Share Posted June 11, 2008 AFAIK 'nocase' and 'last' are incorrect. I've only ever seen them entered as NC and L, respectively. I can't say more than that because I'm at work. Quote Link to comment Share on other sites More sharing options...
kee2ka4 Posted June 11, 2008 Author Share Posted June 11, 2008 Hi, Thanks for your reply. I have changed the htaccess file to NC,L at the end so now my htaccess file has: RewriteEngine On RewriteRule !(\.gif|\.png|\.jpe?g|\.css|\.js|\.php|^public/.*)$ /index.php [NC,L] But when I edit the code to the above, it doesn't display any of the pages. So when I go to: http://www.kingket.com/tumblelog/ (with or without the forward slash), I get the following error: Not Found The requested URL /index.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. And I do have the index file in the tumblelog directory... Any clues? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 11, 2008 Share Posted June 11, 2008 you may need RewriteBase RewriteEngine On RewriteBase tumblelog/ RewriteRule !(\.gif|\.png|\.jpe?g|\.css|\.js|\.php|^public/.*)$ /index.php [NC,L] Quote Link to comment Share on other sites More sharing options...
kee2ka4 Posted June 11, 2008 Author Share Posted June 11, 2008 Hi, thanks for your reply, I guess its just not having it today, lololz, I used your code but now I get the following error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@kingket.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Quote Link to comment Share on other sites More sharing options...
kee2ka4 Posted June 12, 2008 Author Share Posted June 12, 2008 Anyone here can solve my problem? Quote Link to comment Share on other sites More sharing options...
kee2ka4 Posted June 12, 2008 Author Share Posted June 12, 2008 My Server Root Path is /home/kingket/public_html and I simple want to load the index.php file that is located in the tumblelog directory. So /home/kingket/public_html/tumblelog/index.php and I want the htaccess code to display the index.php in the following format: /home/kingket/public_html/tumblelog/ But when I remove the base rewite code "RewriteBase tumblelog/", it loads but I have to manually put the forward slash after the tumblelog and when I include the base rewite code it doesn't seem to work. Is there anyone out there who has knowledge of htaccess, I have little server knowledge and really don't have a clue how to solve this.. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.