URL redirected to index.html in pagespeed - pagespeed

When I submit my website (https://www.examplesite.com/) in pagespeed, it is automatically redirected to https://www.examplesite.com/public_html/index.html. What is the possible reason?

I had a redirection enabled for some countries and the Google Pagespeed server might be placed in any of those counties. That is why the redirection happens in Pagespeed result.

it's depend on your web server to pointing the root.
root /var/www/josuamarcelc.com;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
this is the example from NGINX web server, so when you access https://josuamarcelc.com, the server will try to access the files
/var/www/josuamarcelc.com/index
/var/www/josuamarcelc.com/index.php
/var/www/josuamarcelc.com/index.html
/var/www/josuamarcelc.com/index.htm
/var/www/josuamarcelc.com/index.nginx-debian.html

Related

How do I limit redirects to only the site root and not child sites?

I've got a site hosted by IIS with no site in the root, but two sites as subfolders. So www.mysite.com doesn't contain a site, but www.mysite.com/new does and so does www.mysite.com/old. I'm using IIS version 7.5.7600.16385.
I'm trying to set up a redirect in IIS so that when a user hits www.mysite.com they are redirected to www.mysite.com/new. The problem is when I navigate directly to www.mysite.com/old it appends /new so www.mysite.com/old becomes www.mysite.com/old/new which causes a 404.
I also tried adding <remove name="system.webServer"/> to the web.config in /old to prevent it from inheriting the redirect rule in the /old site. But it doesn't have any effect.
How do I limit the redirect so it only occurs when a user accesses www.mysite.com but not when they access www.mysite.com/old or www.mysite.com/new?
A <httpRedirect> section added to your web.config is probably the easiest way to accomplish the desired redirection. The following Microsoft page should help.
HTTP Redirects <redirection>

How to configure Nginx for serving Symfony2 app from location path?

No problem for me to setup a normal domain or vhost. But I don't get it right to serve from a different directory via location!
Wether the Symfony cookbook site nor the nginx symfony wiki page mention this scenario.
I walked throug several hints from Stackoverflow and elsewhere - but no success.
Is there any resource or working configuration someone can provide me?
Some information:
Symfony root web folder is not a sub folder of webroot; i need to setup a path like /admin for several domains directing to a separate Symfony folder:
Web Root for the domain (differs on domain):
/srv/http/domain.com/htdocs
Symfony web root for all domains accessible with /admin
/srv/http/shared/admin/web
Thanks in advance,
Micha

redirect domain.com to www.domain.com with dns and iis , ERROR = "The page isn't redirecting properly"

I have a web site with the name of soscharge.com
for redirecting soscharge.com to www.soscharge.com i followed the below link :
asp.net web site -> how redirect domain.com to www.domain.com with dns and iis? (prevent duplicate for seo)
i really confused for checking http redirect check box in iis 7.0(windows server 2008)?
i configured my iis as that link said...
mean made two web sites in iis (with and without www)...
and installed HTTP Redirection...
but when i want to check redirect check box on domain.com the other web site (www.domain.com) redirect check box is checked!
why?
and when i open domain.com or www.domain.com in browser (firefox) i get the below error :
**The page isn't redirecting properly**
Firefox has detected that the server is redirecting the request
for this address in a way that will never complete.
*This problem can sometimes be caused by disabling or refusing to
accept
cookies.
how can i prevent double checking of redirect checkboxes?
is this normal?
and how can i fix that error?(my cookies are enable in FireFox)?
thanks in advance
In IIS 7, if you set the site directory the same in the www and non-www versions you'll run into an infinite redirect situation as IIS actually makes an entry in the web.config file, and since both sites are pointing to the same place they share the same config. I leared this the hard way as well!
Now, I point the redirect site to an empty directory so it can have its own web.config.
If you don't like having a bunch of sites set up just for redirecting, another solution is to use the url rewrite module and make a redirect rule. Here is a blog posting about that: http://blogs.iis.net/carlosag/archive/2010/03/31/seo-made-easy-with-iis-url-rewrite-2-0-seo-templates.aspx

Is it possible to rewrite subfolder to subdomain with IIS7?

I have an asp.net application on sub domain sub.domain.com I want to access this application by typing www.domain.com/sub is it possible with IIS7?
Assuming you're happy to manually configure the application at each subdomain:
In IIS Manager, go to Sites, and select your www.domain.com site.
Right click it, "Add Application" and specify the alias "sub" and point the physical path to the same location as sub.domain.com
Select the same application pool as the sub.domain.com site.
Alternatively you could set up a redirect by creating a new Virtual Directory in your www.domain.com site, then dropping in a default.html file that does a http redirect.
A posher (and more transparent to the user) redirect could be done like so:
Open an elevated command prompt
run the following command:
%windir%\system32\inetsrv\appcmd set config "nameofsite/virtualdirectoryname" -section:system.webServer/httpRedirect -enabled:true -destination:destinationofredirect -commitpath:apphost
I lifted that from: http://www.andrewwestgarth.co.uk/Blog/post/2008/07/31/Creating-Http-Redirects-in-IIS7-on-Virtual-Directories-like-IIS6.aspx

Removing www from url in IIS 6

I have an SSL certificate setup for www.mydomain.com. I'm having a strange issue in IIS 6. When I navigate to www.mydomain.com everything works fine. Since the www. part is what my ssl certificate is registered under I get no issues. Hwoever, all of my links in my site take me to mydomain.com/mylink which causes a cetificate error because it's not prefixed with www. My website is ASP.Net and all my links are relative to the root (in other words I'm specifying ~/mylink and not hardcoding the mydomain.com part). Any idea why IIS or asp.net is removing www from all my links?
You could setup another website specifically for the non-www one and force it to redirect back to the www site.
Then setup logs in a different location and see if that lets you find the offending pages/links.
Otherwise you may have to use some link checking script to see if any links are coming out incorrectly. Normally, you should be using '~' in your links so that they get resolved by ASP.NET. This should give you an app relative root which shouldn't give you this error.
So you may have a few 'http...' links in there.
Failing that, I can't think of another reason!
HTH anyway.

Resources