in my htaccess file i have the following contents..
Options +FollowSymLinks
RewriteEngine On
Options -Indexes
when i am enabling this htaccess file my project directory is not showing in localhost :(
http://localhost/MyStartUp/OurProDeal/admin/ - showing internal server error and http://localhost/MyStartUp/OurProDeal/ not showing admin directory.
this htaccess file is working fine in my other machine.... any help
Error i am getting
Internal Server Error
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
Related
If i try to access www.wordpress.com/codeigniter it is getting redirected to www.wordpress.com/en/codeigniter. If i change rewriterule in the .htaccess of wordpress to
RewriteRule ^(.*/)?codeigniter/(.*) /codeigniter/$1 [L]
Getting 500 internal server error. The server encountered an
internal error or misconfiguration and was unable to complete your
request.
Please contact the server administrator, webmaster#domain.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 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.
Help me out to get this done please, Thanks in advance.
My URL is like this:
http://example.com/Folder/index.php?city=Berlin&id=1
I want to turn it into:
http://example.com/Berlin/1
Using Generate It! I get this code:
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /Folder/index.php?city=$1&id=$2 [L]
But when adding this in my .htaccess file and trying to open http://example.com/Berlin/1 I'm getting 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, [no address given] 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.
Apache/2.2.14 (Ubuntu) Server at example.com Port 80
What am I doing wrong? I'm trying since hours to get it work, but without success.
I found the solution:
I'm using this in my .htaccess:
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/id/([^/]*)$ /Folder/index.php?city=$1&title=$2&id=$3 [L]
to change this link:
http://example.com/Folder/index.php?id=566&city=Berlin&title=this_is_the_websites_title
to:
http://example.com/Berlin/this_is_the_websites_title/id/566
I want to semantic my website URL, but when I want to show result I have a 500 Error
Internal Server Error
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 (Win32) PHP/5.5.12 Server at localhost Port 80
The .htaccess code
RewriteEngine on
RewriteCond %{REQUEST_URI} 10/
RewriteRule 10/ http://localhost/Cnxkhamsat/admin/edit.php?chi_id=10
Any help ?
The code appears to work fine when trying on a local machine, meaning there are no syntax errors.
The most likely scenario is that you do not have the appropriate permissions to use the RewriteEngine. This usually happens when using a shared hosting, or sometimes VPS.
If you have access to your httpd.conf file you can most likely turn the RewriteEngine on from there. If you don't have access to it, then you'll likely need to contact your hosting provider and tell them that you need them to allow you to use the rewrite engine.
Well I have been having a tough time trying to figure out the reason for getting the forbidden error message on my wamp server.
I have a folder website_ink inside c:/wamp/www/ folder. when I access
http://localhost/website_ink/
the index page loads fine. But when i try to access any other page it gives me a forbidden error message.
The url i tried accessing was http://localhost/website_ink/cloud-plans.
This page does exist inside my root directory meaning inside website-ink/cloud-plans.php page does exist.
This is the error I find when visiting the url on browser
Forbidden
You don't have permission to access /website_ink/C:/wamp/www//website_ink/cloud-plans.php on this server.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at localhost Port 80
This is the error message i found in the log file
The given path is misformatted or contained invalid characters: [client 127.0.0.1:60811] AH00127: Cannot map GET /website_ink/cloud-plans HTTP/1.1 to file.
I do not have any virtual hosts setup or anything fancy. Also I tried upgrading from Apache 2.2 to Apache 2.4. Currently I am using Apache 2.4.
Please help
The reason why it happens is you try to open "/website_ink/cloud-plans" instead "/website_ink/cloud-plans.php".
In case you want to use path wiht out file extension you need add rewrite rule to .htaccess or httpd.conf:
RewriteEngine on
RewriteRule ^/(website_ink/.*)/$ /$1.php [L,QSA]
Also you need mod_rewrite to be installed and enabled
I was looking for this over google and found just one thing repeated on every single website.
Edit your .htaccess and add this line:
ErrorDocument 404 /yourpage.php
So for example my page is error.php so it is obvious that it should be:
ErrorDocument 404 /error.php
However even if I type full domain name it doesnt works. It gives me Internal Server Error only and I have no ideas how to make it.
Any tips? Thanks.
EDIT No.1:
I am not quite sure where do I check for these "Apache" logs.
Btw here is full ISE Message:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, *webmaster#mydomainname.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 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Also I have tried making error.html and doesnt works. And also I Do not use any other rewrites in htaccess.
Then your webserver does not support this option...
Look into your http.conf and search for
AllowOverride <value>
If it is not equal FileInfo or all configuring error documents is not allowed.
Change it to All to make it work (and restart Apache afterwards)
If you do not have access to the http.conf, ask your Provider to allow custom error documents.