In my codeigniter project, I have set error page for 404 page not found. It works fine but when I hit url with dot[.] at last or between url, It shows apache's 404 page not found message instead of my error page.
plz help me if anyone can...
Make a new file called .htaccess in project root folder if not exists and add below code in it with 404 url.
ErrorDocument 404 /error/404
Related
I use OpenLiteSpeed as a web server, and when I load my website I get a 404 error instead of it automatically loading the index.html page, when I put index.html in manually the page loads without a problem
We have an e-commerce website built on the Magento platform at vaperempire.com.au and would like to automatically 301 redirect all 404 errors to the homepage. How would we go about doing this?
Thanks in advance to all those who help!
ErrorDocument 404 /index.php <--- Your home page
Try this on your .htaccess file. Carefull though because 404 responses are completly normal and let you diagnose bad urls on your webpage.
If there are only a few you can try this.
Redirect 301 /oldpage2.html http://www.yoursite.com/folder/
I am using "WordPress SEO by Yoast" plugin in my website http://www.goopro.org/ for seo and sitemap. But it shown me 404 error.
Here is sitemap url...
http://www.goopro.org/sitemap_index.xml
Please suggest why this error occurred. And How can I resolve it.
Under the plugin settings for Yoast, have you checked the box to allow XML sitemap ?
I would check that the file sitemap.xml is in the root directory of your website as it doesn't seem to be in there according to the 404 error you are receiving.
I have a page at http://www.example.com/my-inner-page. I need my server to respond with a 404 when someone tries to access this url. What is the rule I would use in htaccess to accomplish this?
Thanks!
You can use RedirectMatch:
RedirectMatch 404 "my-inner-page"
I am using joomla 1.5,I am having some of page with 500.But I want to redirect those page to new page is this possible. below I have given the example.
Old page http://example.com/oldpag [500 eror page]
I want to redirect the above url to new working page
New page http://example.com/newpage
Please advise me..
Regards,
SurezRam
go to folder location: yoursite/template/system/ and modify the error.php,
put following redirect code after defined( '_JEXEC' ) or die( 'Restricted access' );
header("location: http://example.com/newpage");
exit;
add the below code to your .htaccess file in the root of the joomla installation if you can't find one create one.
# CUSTOM ERROR PAGES
ErrorDocument 400 URL/error/403.shtml
ErrorDocument 401 URL/error/403.shtml
ErrorDocument 403 URL/error/403.shtml
ErrorDocument 404 URL/error/404.shtml
ErrorDocument 500 URL/error/500.shtml
# END CUSTOM ERROR PAGES
where the url is the url of the site.
I have put respective error files accordingly. for internal server error [500] it would redirect to 500.shtml file inside the error folder. Shtml is nothing but html file with renamed extension.
You can use the solution in the joomla documentation. This is usable for any error code.
http://docs.joomla.org/Creating_a_Custom_404_Error_Page
For 1.6 i posted a fix here on this stackoverflow question :
How do I create a custom error page (404) for Joomla 1.6?
This fix would also be necessary for kumarans solution.
thanks for this share , we can also use joomla redirect for more detail you can get it from here
http://webobserve.blogspot.com/2011/03/redirect-error-page-to-some-other-page_09.html