Showing error on live server i.e Forbidden - .htaccess

My website is running fine on localhost but on live server it is showing an error i.e.
Forbidden
You don't have permission to access /package-booking.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
This error is showing after following 3-4 next pages from index.php page. I have also changes the public_html's all directory permission to 0755 and files to 0644 but still facing the same problem. Please help me out, I am poorly stuck in it. Thanks in advance.

Related

Created cPanel subdomain, files inside the subfolder showing 500 error

I have setup a subdomain in cpanel like market.domain.com. The document root for this is /public_html/market/. I have places PHP files here
/public_html/market/info.php - this is working
/public_html/market/api/info.php - not working
any help for this will be much appreciated.
TIA
500 internal server error
You need to check 3 things:
Check if there is any .htaccess file in the api or market directory. If yes, please rename the .htaccess file to .htaccess.original and see if the sub domain URL is working. If its working, then review the code in the .htaccess file.
Check the directory permission / ownership to see if its correct.
Check the error logs to find out exactly whats causing the problem.

Missing htaccess file on server?

i've just created a website. It's hosted by GoDaddy and I use cPanel to manage it.
all of my files relating to my website are stored in a public_html folder.
The problem I am having is that I cannot seem to access different pages I have uploaded, I'll show what I mean.
www.website.com --> works fine (defaults to home.html)
www.website.com/About/about.html --> works fine
www.website.com.com/About --> I get the error below:
"You don't have permission to access /About/ on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
I would like website.com/About to display about.html.
I think it may be something to do with the .htaccess file? I may of clumsily deleted it at some point.
I have tried to set permissions to 777 on all my public_html files, but I get the same error.
I have tried to locate my htaccess file, but I think its hidden by default. I've tried to find it using a terminal and connecting to my site - also with no success.
Any help to solve this issue would be great cheers!
If /About/ is a directory and these are static HTML files, rename about.html to index.html.
Servers will look for index.html in a directory if nothing else was specified in the URL.

WAMP 500 Internal Server Error .htaccess

I know there are lots of topics there about this error, but i hope you can help.
here's the error message:
The server encountered an internal error or misconfiguration and was
unable to complete your request. Please contact the server
administrator at admin#example.com to inform them of the time this
error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error
log. Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80
I think the problem is caused by .htaccess file:
DirectoryIndex index.php index.php3 messagebrd.pl index.html index.htm# disable directory browsing
Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes**
Server 500 errors can be quite a hassle to diagnose, but if you think its the .htaccess file that is causing the problem you need to work out which line is the problem by a simple process of elimination.
Start by removing the .htaccess file, and start apache
Then add one line at a time to the htaccess file restarting apache after each change.
When apache fails to start then you know what line in .htaccess it is that is causing the problem

404 Redirect Error with .htaccess

I'm running a website on a local server (using WAMP Server) and I'm trying to test to see if my 404 page would work, but when I try to navigate to a nonexistent page, I get an error that says:
The requested URL /dsf/sdkmf was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
My 404 page is in the root folder with all my other pages and my .htaccess Error Document handle is listed as:
ErrorDocument 404 /404.html
I don't know why it's throwing me this error much less how to fix it, does it have something to do with my WAMPServer configuration?
Never mind - I figured out how to solve it on my own - apparently you have to use the direct path to the file - even if it's in the root directory of the site itself!

URL rewriting errors in my htaccess file

everyone..
I need to rewrite this URL
http://www.mydomain.com/profiles/tutors/index.php?tutorCode=1255&tutorName=Kasun%20Perera&city=Bandarawela
like this
http://www.mydomain.com/profiles/tutors/1255/Kasun+Perera.html
I tried this with Apache’s mod_rewrite feature. But I couldn't reach to my expecting result.
Here is Code that I have tried.
RewriteEngine on
For specific teacher:
RewriteRule ^lanka_institute/profiles/tutors/([0-9]+)/([A-Za-z\+\-]+)/([A-Za-z\+\-]+)/$ index.php?tutorCode=$1&tutorName=$2&city=$3
It is not working and then I can get this error message.
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin#localhost 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.
any comments are greatly appreciated.
Thank you.

Resources