Protocol Relative URL – Crawl Issues?

I've been having an issue with a generally small website using a lot of bandwidth. I have had a look in Awstats, and in the last month there has been 916MB of viewed traffic, and 4.44GB of non-viewed traffic, which led me to believe there was a bot/404 issue.

As expected, it shows 3.3GB of 404 bandwidth. However, when I look in the list of 404 errors, they are all protocol relative URLs. Within Awstats they show as '/address.com' etc, and within the actual source code as '//address.com' (as opposed to http://address.com.)

All of the paths work fine in a browser, and don't give a 404 error.

I have seen nothing online to suggest bots/crawlers should have any problem with these, but it seems on this occasion they are. Unfortunately all of the protocol relative links are part of Wordpress plugins, so I can't simply change them.

Has anybody seen an issue like this before? Also, is there anyway to force the behavior to change? I saw a webpage that explained how to use .htaccess to override the protocol relative path and make it http, however I foolishly failed to bookmark it and can't find it now...

Hello world flask app only shows in Safari

I'm very new to flask and web development. I've been working through the examples to deploy the hello world app on a remote server.

I completed all the steps but found i would only see the apache2 default page when access the domain through chrome on my laptop. I thought it hadn't worked until i tried in safari on my iPad and the app output was there.

Can anyone help me understand why it isn't showing through my pc browser? And how i can fix that?

Run cgi application locally with the owner’s permissions

As the title suggests, I am trying to execute a binary though cgi from the shell locally. The problem is that the binary performs some privileged operations and so it has to run as the file's owner. The binary is executable for all users and it does run as the owner when it is called through the web interface

I have tried to set some of the environmental variables of php-cgi but i couldn't make it work, it just returned the executable's source:

REDIRECT_STATUS=200 REQUEST_METHOD=GET SCRIPT_FILENAME=/path/to/cgi-bin/binary SCRIPT_NAME=/f/cgi-bin/binary PATH_INFO=/ SERVER_NAME=server SERVER_PROTOCOL=HTTP/1.1 QUERY_STRING="args" REQUEST_URI=/f/cgi-bin/binary HTTP_HOST=host /usr/bin/php-cgi

Is there any way to achieve that? (I am not root/sudoer)

Apache on windows and php-fpm


php 7.1
Apache 2.4 + mod_proxy_fcgi
Windows 10

I'm trying to set up php-fpm + apache on windows, using mod_proxy_fcgi but keep getting errors. Can anyone help me with configuring apache.

I got php-fpm runnig, and verified that it actually works using nginx, so php should not be a problem.


PHP-fpm is running on port 9123.

Here is my vhost config:

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "${SRVROOT}/htdocs"
    <Directory "${SRVROOT}/htdocs">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        <FilesMatch "\.php$">
            SetHandler proxy:fcgi://127.0.0.1:9123
        </FilesMatch>
    </Directory>    
</VirtualHost>

Here is the error:

Proxy Error

Your browser sent a request that this server could not understand. The proxy server could not handle the request GET /index.php/.

Reason: URI cannot be parsed: fcgi://127.0.0.1:9123C:/Apache24/htdocs/index.php*

Does anyone know how to fix it ?

.htaccess Rewrite Images to Different Directory [duplicate]

This question already has an answer here:

I'm working with Craft CMS locally on my Mac which works, but the path is localhost/project/public which is not desirable. I created a RewriteRule that allows me to use localhost/project which works, but now none of the images, styles, and other assets no longer work.

I'm thinking I need to create a RewriteRule to redirect all my assets to another path. Here is what I ended up with.

RewriteEngine On

# hide public in the url
RewriteRule ^$ public/ [L]

# my attempt to fixing all the broken assets
RewriteRule ^/assets/logos/(.*)$ public/assets/logos/$1

Any ideas on why my RewriteRule is not working?

EDIT This has been falsely marked as a duplicate. The duplicate suggests I change the markup to add forward slashed to point to root. No where did I suggest or want to change my markup. I am looking to make this work via .htaccess.

project name getting removed from the link in laravel

I have a laravel project running in my Win10 laptop using xampp,I was trying to remove the /public from the address bar but I ended up making my project unrunnable,I removed all the changes which I have done and brought it back to how it was. Now,when I run localhost/myprojectname/public it shows me this

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.28

redirect all page except homepage

i want to htaccess redirect all pages to folder called (wp-simply) except home page or / will not redirect , will open the same home page i have searched a lot but get nothing working

i do this now

RewriteEngine on

RewriteBase /
RewriteCond %{REQUEST_URI} !^wp-simply
RewriteRule ^(.*)$ /wp-simply/$1  [L,R=301]

it redirect all that do not have wp-simply to wp-simply and also redirect the home page to wp-simply i want it to redirect all except the home page

Load .htaccess IP from file

I run several wordpress sites on the same server (shared account). I want to only allow myself into the /wp-admin /wp-login.php parts of my sites with IP.

I will FTP in and set my current IP if I need to make changes to my IP(to prevent annoying bots). I do have a static IP, but I'm sure it'll change sometime.

I want to change the .htaccess of my 100 sites to read from 1 file that has the IP. Like a variable.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>

My current rules are as follows and it works. Now I want to read the "!^123.123.123.123$" part from a files such as "/myserver/http/public_html/ip", this way when I change it it will go to all .htaccess files on all the servers, changing manually will be tedious when I got 100 sites going. What should I put there to make it us a variable/file that I can modify?

I tried looking at a few sites including this, but it's above my current knowledge:

http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet/#REMOTE_ADDR

Thanks for any help, Chris