Tag Info

New answers tagged

3

A sitemap does not usually help get pages indexed. See The Sitemap Paradox. To get pages indexed: You need to link to each page from some other page or preferably multiple other pages. Include enough unique content on each profile that Google doesn't view the pages as duplicate. Provide a good landing page experience for anybody coming to the page ...


9

Sitemaps can be dynamic just like web pages. Just have a PHP script grab those names from the database and make a loop to echo out the XML for each one. Also, make sure you output the proper content type for your XML. That's it. The code below is a basic script for generating a dynamic XML sitemap. Please not this is only an example intended to point you, ...


0

The solution would be the same as for Block a random domain pointing at my dedicated IP. I posted an answer there with configuration and a script. Basically, you need to create a default virtual host entry to handle the IP address and any other random addresses. Then you can have your real site in a second virtual host directive that is specific to your ...


2

In this case, where you are already rewriting the "pretty" URL to the "ugly/real" URL you can redirect the ugly URL to the pretty URL by checking against THE_REQUEST. This contains the original HTTP request, before any rewriting has occurred. Otherwise you are in danger of creating a rewrite loop when you rewrite back to the ugly URL. For example: ...


1

That question made me mix quite some things. This one works as expected according to what I tested, with | operator, taking advantage of the possibility in Apache 2.4 to use the $ sign as line ending: <DirectoryMatch "/opt/lampp/htdocs/[^/]*/public/(uploads(/[^/]*)?|(wp/wp-content/uploads(/[^/]*)?))$"> Require all granted </DirectoryMatch> ...


0

My only suggestion would be try adding more parenthesis to the regular expression: <Directory ~ "/opt/lampp/htdocs/[^/]*/public/(uploads|(wp/wp-content/uploads))"> The order of operations with | and / could be part of the issue.


1

Just remove that crap from .htaccess. These lines are meant to be used in a completely different setup than yours. Obviously, you have Apache's mod_php5 already installed, and it is used for your PHP files automatically. That's perfectly fine! No need for mod_cgi. However, if you really don't want to use mod_php, you should uninstall libapache2-mod-php5 ...


0

You would also need to enable mod_proxy_html. ProxyPassReverse only rewrite the HTTP headers. To rewrite the content of the HTML (such as absolute links), you need to enable the additional module. The documentation for ProxyPassReverse states this pretty clearly: This directive lets Apache httpd adjust the URL in the Location, Content-Location and ...


2

After a little digging and playing around with this, I've managed to figure it out and now have a working scenario for mod_pagespeed to only work on specific domains (vhosts) on the same server. My configuration is based on a CentOs 6 build Apache 2 that runs Parallels Plesk Panel. Create a separate pagespeed conf file and store it in a location that won't ...


1

HTTP_COOKIE is a semi-colon delimited list of all the cookies that are set. Your == test would only work if your cookie were the only one set. Instead, I would try this regular expression match in the <If> directive: <If "%{HTTP_COOKIE} =~ /XDEBUG_SESSION=leho/">



Top 50 recent answers are included