I have magento setup (Magento ver. 1.6.0.0) on my hosting server and I am trying to build a new php page which has got nothing to do with Magento.
page.php:
<?php
echo 'test';
?>
I've put this php page in a test folder and tried to access it :
domain.com/test/page.php
But it automatically redirects the page to no-route.
Is there some global setting / config that does this in Magento?
I found the issue, it was to do with .htaccess file redirecting to the wrong location and thus the entire URL was always breaking.
Related
Can anyone please help me with is question here. I want to set a CMS page as homepage in prestashop 1.7 and still able to keep the old default Prestashop homepage as my Shop button link in menu still?
Best way is to make a redirection, because on the Prestashop backend you cannot do that easely and it could harm your website. You can also build your own Html and integrate it on the homepage via a module.
But best seems to be with a redirection :
Your server uses apache, just add this line to the .htaccess :
Redirect 301 /retiredpage.html /newpage.html
Your server uses nginx, add this line to your configuration : rewrite ^/retiredpage.html$ /newpage.html permanent;
You don't know and you don't want that ? Just use a redirection module, there are many on Prestashop Addons.
On the index.php page at the root of the site, replace the code with that:
require(dirname(__FILE__).'/config/config.inc.php');
if(Tools::getValue('home')) {
Dispatcher::getInstance()->dispatch();
} else {
$link = new Link();
Tools::redirect($link->getCMSLink(ID_PAGE_CMS));
}
Then if you go on the homepage you will be redirected to the CMS page for which you have indicated the link, to go via the menu on the real home page, add? Home at the end of the url of your website www.yourwebsite.tld? home
We need to deploy two different Angular5 project on Amazon S3, like
/assets (folder)
/index.html
/clients (another Angular5 folder)
/clients/assets (folder)
/clients/index.html
For example my domain is https://example.com
Now, When we try to access root index.html files with https://example.com, it is working fine. but, When we trying to access https://example.com/clients, it returns an error "Error: Cannot match any routes. URL Segment: 'clients'"
One more thing, We have setup 403 redirection on rootpath index.html, because we need to access login page when customer directly hit URL : https://example.com/login
So, When I am trying to access https://example.com/clients, it is automatically redirected on https://example.com
Could anyone please help me on this?
The project should be built with this command:
ng build --base-href /clients/
Option base-href indicates that, you what is before the Angular routes.
On the other hand, it's posible you need something like nginx in your server that redirect the request to different projects.
I am facing strange problem. On my development environment (homestead) everything is working fine as I created virtual directory in nginx. But this app needs to be installed under subdirectory of apache root directory in production.
When I secure controller with middleware ("auth), it redirects to login page correctly. When I enter credentials, it redirects to "http://example.com/auth/login". I am not sure whats going wrong with it. I tried all options including changes in .htaccess as suggested in other posts but none is working.
Auth views have hardcoded URLs in them and they are causing these issues.
Go to "resources/views/auth/login.blade.php" and change
action="/auth/login"
with
action="{{ url('auth/login') }}"
Do the same for every action and href attributes throughout the "resources/views/auth" directory.
I have a Joomla site running on Apache and Ubuntu 12.04. I wanted to show a custom 404 pages to be shown when a 404 error occure. I have made necessary changes to error.php file in my template directory to redirect it to '/404' directory where I have an index.html file with many images,css and java script.
Now when accessing a non-existent page, Joomla is redirecting me to root/404 but there I get a 403 Forbidden error from appache. The 404 directory is located inside 'htdocs' directory of Joomla installation.
Additional info:
1. I don't want to convert my 404 page into a Joomla template or article.
2. I am using a Joomla AMI from Bitnami on Amazon web service
If you redirect to a 404 page, you corrupt the error mechanism. The client will never get that 404 status, but a 200 on successful redirect to your error page.
Instead, you should modify your template's error.php to
send the 404 Not Found header
directly send the error page using readfile()
You might have to adjust the asset paths within your error page.
That's totally wrong, working with static pages does not mean that you have to overcome Joomla's routing.
You should either override the error Page view or use custom error pages.
Take a look at Joomla's documentation.http://docs.joomla.org/Custom_error_pages
Nibra was totally right about breaking the mechanism but still using a readfile() seems as an overkill.
I have a joomla site in my domain root, i.e www.myjoomlasite.com and I have a rails application in www.myrailssite.com/railsapp
I want to deploy the rails application in a sub-directory of http://www.myjoomlasite.com, expecting that rails application will be available in http://www.myjoomlasite.com/railsapp.
After doing all necessary steps when i click, www.myjoomlasite.com/railsapp in browser, it redirect me correctly to http://www.myjoomlasite.com/railsapp/admins/sign_in
Then in spite of displaying the sign_in page, it displayed joomla's error page "404 page not found"
My questions are:
If anything wrong with the rails application it should display rails
error page, but why joomla's error page?
In rails application production log why it showing Completed 401 Unauthorized in 1ms ?
How can i deploy rails application in a sub-directory of my joomla site?
Additional information:
rails application production log
Started GET "/railsapp" for 24.5.7.81 at 2012-09-14 08:41:36 -0700
Processing by HomeController#index as HTML
Completed 401 Unauthorized in 1ms
UPDATE
I have found the possible reason behind '404'. I have .htaccess file in document root. This .htaccess file stoping rails application to render.
Is it possible make some changes in .htaccess file show that, rails app can render properly?
There is a .htaccess file in document root. This default .htaccess file comes with joomla source code ( as htaccess.txt, letter is was renamed to .htaccess). There is one RewriteRule based upon some RewriteCond . All the rewrite condition, that are comes with default htaccess file, stopping my "/railsapp" url to render. To allow to pass my "/railsapp" i add following RewriteCond in .htaccess
RewriteCond %{REQUEST_URI} !^/railsapp
If any url start with 'railsapp' prefix, then those url will not rewrited by rewrite rule and visit that url directly.