When I go to the url: http://localhost/checkout/pay/393032-bb9320fc213459a-6c653c8bd1
I get a 404 error, which is correct, because this page does not exist.
However, when I go to http://localhost/checkout/pay/393032-bb9320fc213459a-6c653c8bd1/ (note the addition of a trailing slash) it redirects me to http://localhost/pay/393032-bb9320fc213459a-6c653c8bd1 (without the /checkout), which also does not exist.
Why is the addition of a trailing slash causing it to redirect me? I don't have a .htaccess file, so it can't be that, and since the pages do not exist it can't be a script doing a redirect. When I look at the page in firebug, I don't see a redirect either, it seems to be changing the url invisibly, and I can't figure out why. Where should I look?
Edit: turns out it is only this one specific url that is being redirected, and it only happens in firefox, so I don't think it's an apache problem. I'm using Firefox 26.0, on ubuntu. what would make firefox pick one url and redirect it like this?
See if you have Apache Module mod_dir activated
http://httpd.apache.org/docs/current/mod/mod_dir.html
It will automatically add a / if needed and serve the default page.
Related
So i have a problem with my redirects in magento. All the incoming traffic from http:// is redirected to https:// for every page. However when http://example.com?gclid=Test123 is redirected, the parameter part is removed/dropped. If I try it using https://example.com?gclid=Test123, it works.
This looks like it has to be configured in my .htaccess but I am not sure how.
This proved to be a problem with the FPC cache extension I was using. After stopping all cache tools, everything worked.
I've been battling with redirects after users log in.
The redirect is encoded into the URL. For example:
http://demo.a3m.local:8090/account/sign_in/?continue=http%3A%2F%2Fdemo.a3m.local%3A8090%2Faccount%2Faccount_settings
On this demo install it works perfectly.
However on a development site it seems to double encode the url so it becomes:
http://dev.mysite.local:8090/account/sign_in?continue=http%253A%252F%252Fdev.mysite.local%253A8090%252Faccount%252Faccount_profile
Forward slash is encoded to %3A and then further to %253
Any suggestions?
Thanks.
Typical - struggle for days and as soon as you ask the question one works it out.
It was my .htaccess file rewriting the URL.
Used the No-Escape flag to fix it: http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_ne
I have moved my CodeIgniter application from my first server provider where everything works great to another one ( because of better speed etc.) and I have now two strange problems with WSOD.
When I go to my homepage I get a WSOD.
Well, I tried to remve the index.html file in the root and it magically works.
My question is why I need to remove the index.html file if it is there as a default file in CI package?
Is this a problem of the server? What should they change so I can leave index.html in my root? Should they enable some module or?
I think it is better for security reason to have index.html in the root folder or am I wrong?
My another problem is that when there is a redirect, e.g. on login, submiting form. I get after hitting submit a WSOD. But only when the validation is successful, so I am asssuming that the redirect failed.
One thing to notice. I am not using refresh as the second parameter, bacause it causes problems WSOD on my localhost.
Could this be a problem?
Which Apache or PHP server configuration paramter could cause this problem?
EDIT: I tried redirect('admin', 'refresh'); and also redirect('admin', 'location', 301); but I am still getting WSOD :(.
EDIT 2: Could this be an issue of disabled FastCGI PHP5?
EDIT 3: My base url in config file is OK: $config['base_url'] = 'http://www.myproblematicpage.com/'; . It has the trailing slash and everything what is needed. I am not using subfolders etc.
EDIT 4: I have changed the title of this post to be clear that everything works on my first provider, but this problem emerges after moving to another
OK, so after enabling showing errors in index.php (changing production to development mode) I saw that the problem was on the first line of the form_validation_lang.php file in my application/language/english folder. But I didn't saw any whitespaces before the first UTF-8 without BOM and BANG!... the problem disappeared. Probably the BOM was the troublemaker. However, I still don't know how could it work on the previous hosting.
I'm experimenting (and having problems!) with codeigniter.
In particular, links do not work.
even if they are correct (eg. http://localhost/ci-book/welcome/cat/3, where welcome is controller, cat the method), they can't be open and chrome says "Oops! This link appears to be broken...."
Someone suggested to check that mod_rewrite is working. How can I do that?
I'm using Mamp.
thanks,
P.
First, check that the basic URL without mod_rewrite works: http://localhost/ci-book/index.php?welcome/cat/3
Then setup mod_rewrite, restart httpd, and attempt to navigate back to your URL. If it works (or at least, if part of the page loads with errors), then mod_rewrite is working.
I have Joomla 1.5.9 running on IIS7. I'm now experimenting with the SEO Settings from the Joomla global configuration page.
First I toyed with Search Engine Friendly URLs (that gets rid of the queries part of URLs); that works fine.
I also tried to enable the "Use Apache mod_rewrite". I installed "Microsoft URL Rewrite Module for IIS 7.0" and added the web.config as per http://learn.iis.net/page.aspx/527/joomla-on-iis . When clicking on menu links, this seems to work in that I no longer see index.php in the URL. The address bar updates to what appears like the right URL, but the content shown is always that of the home page. I tried both in IE and Google Chrome with the same result. Refreshing the page after loaded made no difference.
I tried re-starting IIS7, it didn't make a difference.
Edit: After I followed the suggestion below (followed instructions at http://www.mydotnetworld.com/post/2008/10/24/URL-Rewriting-In-Joomla-15-on-IIS-7.aspx :turned on fast cgi, modified php.ini, and imported rewrite rules instead of putting them in a web.config myself), I now get 404's instead of just showing the home page's content. The URL still appears to be correctly rewritten. So, different behavior but still doesn't work. I'm not sure this is useful information, but these two fields are shown in the 404 page:
Requested URL http://localhost:80/joomla_course/seasonal-specialties
Physical Path C:\inetpub\wwwroot\joomla_course\seasonal-specialties
Should the physical path be the 'non-rewritten' URL? Or is it expected that that it be like this?
Edit 2: Oho! I found someone with the same issue posted on Joomla forums: http://forum.joomla.org/viewtopic.php?f=543&t=364706&p=1598137#p1598137 . No answer there either, though.
Any idea on how to diagnose (or even better, fix :) ) this?
Thanks!
I got this to work now. The key was to make sure FastCGI is used to run php (as per http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70 ), and making sure that the "Use Apache mod_rewrite" is enabled. If "Use Apache mod_rewrite" is turned off but the rewrite rules are present in IIS7, then the HTML shows up but none of the styling or images.
The requirement for using FastCGI is weird (and contradicts what is suggested in http://maximumpcguides.com/windows-vista/how-to-create-a-windows-vista-iis7-mysql-php-web-server , which is what I used to setup php in the first place). Everything seems to work when not using FastCGI, except for the URL rewriting.
It seems that either importing the rules (as suggested in http://www.mydotnetworld.com/post/2008/10/24/URL-Rewriting-In-Joomla-15-on-IIS-7.aspx) or manually adding them to a web.config file (as suggested in http://learn.iis.net/page.aspx/527/joomla-on-iis ) will work.
It looks like there is something wrong with the rules in the web.config. Just going from a comment on the article you linked you are not the only one having this issue. I would remove the web.config and then follow the steps outlined here.