Jump to content

my .htaccess file causing problems.. please help!


kee2ka4

Recommended Posts

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

 

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.