I have installed php 5.59 and apach2 2.4.7 installed in my koding.com VPS. I have a working .htaccess file which is (not very clean at the moment) locally running without any problem. How ever when I have uploaded the site into the server it is working funny. Theres one URL like this
http://bhashithe.koding.io/forum/read/need-to-check-the-answer-counter-works
I have added the re-writing scheme like this
RewriteRule ^read/(.*)$ /read.php?url=$1
But when I open that link it is re-directed to this
http://bhashithe.koding.io/forum/read.php?url=need-to-check-the-answer-counter-works
How ever that link is working ok. But when I open other links those return the 404 error perfectly re-directed to the one I have mentioned in the .htaccess file.
I am including the whole file for your reference.
RewriteEngine on RewriteCond %{HTTP_HOST} ^bhashithe.koding.io [NC]
RewriteRule ^read/(.*)$ /read.php?url=$1
RewriteRule ^edit/(.*)$ /creator.php?url=$1
RewriteRule ^category/(.*)$ ./category.php?category=$1
RewriteRule ^tag/(.*)$ ./tag.php?tag=$1
RewriteRule ^index.html$ ./post.php
RewriteRule ^$ ./post.php
RewriteRule ^login$ ./login.php
RewriteRule ^new/$ ./creator.php
RewriteRule ^search/(.*)$ ./search.php?key=$1
RewriteRule ^profile/(.*)$ ./profile.php?username=$1
RewriteRule ^login/(.*)$ ./login.php?response=$1
RewriteRule ^settings/(.*)$ ./settings.php?response=$1
RewriteRule ^profile/(.*)$ ./forum/profile.php?username=$1&feedback=$2
ErrorDocument 404 /forum/error.php
If theres anything that i am doing wrong please be kind enough to point that out. Thank you, Bhashithe
Connect to your server with SSH
Seems that your rewrite mod is not enabled on your server (but is on you local machine).