Tag Info

Hot answers tagged

3

You can do this by adding another condition. RewriteCond %{REQUEST_URI} !^/members [NC] RewriteCond %{REQUEST_URI} !^/activity [NC] RewriteRule ^(.*)/([0-9]+)/$ /$1/S$2/ [R=301,L] Or, sometimes simpeler, use the OR of a regex: RewriteCond %{REQUEST_URI} !^/(members|activity) [NC] RewriteRule ^(.*)/([0-9]+)/$ /$1/S$2/ [R=301,L] I've removed the .*$ ...


3

You can just add another RewriteCond directive: RewriteCond %{REQUEST_URI} !^/activity RewriteCond %{REQUEST_URI} !^/members RewriteRule ^(.*)/([0-9]+)/$ /$1/S$2/ [R=301,L] Multiple RewriteCond directives are AND'd together by default. The OR flag can be used if required. I've removed the NC flag - unless you specifically need a case-insensitive match. As ...


3

While it isn't impossible to host multiple secure sites on a single IP address, thanks to SNI and SAN, the redirect you're trying to do is impossible without one of the aforementioned solutions. In order to receive a redirect from https://www.olddomain.com, the browser must have already requested that URL using SSL/TLS, and is expecting an encrypted response ...


2

It looks like that code was developed to stop bots probing humans.txt via query strings. Not Blocked: http://example.com/humans.txt Blocked: http://example.com/?some_path=http://www.google.com/humans.txt? There is plenty of online guides about blocking humans.txt additionally lots of websites explaining what does what, a lot of those rules in that block ...


2

GoDaddy by default enables mod_deflate and globally sets the compression types on all packages purchased in the last few years. Only classic accounts require manual intervention. SOURCE Our Linux Web Hosting hosting accounts have mod_deflate enabled by default. This compresses all text type files requested from it. You can disable mod_deflate ...


2

In PHP, you can use the header function to specify a custom Etag as follows: $et="11111"; // any custom etag value header("ETag: \"".$et."\"",true); Just make sure when you update the webpage in question that the etag value is updated. If you don't want to do a manual etag update, you can use this code instead: $et=md5(time()); // 32-bit etag value ...


1

about the images and CSS not displaying; If your URL gets rewritten to something like products/31 keep in mind that relative links inside the html are now relative to products/ even though the php script itself sits in the root. Because the html gets interpreted by the browser and the browser thinks you are in the products/ folder. You can use absolute urls ...


1

Okay. There is a mod_dir http://httpd.apache.org/docs/2.2/mod/mod_dir.html which provides for a trailing slash redirect. You might want to enable this to make your life a lot easier. It is the module LoadModule dir_module modules/mod_dir.so in your configuration- you may need to un-comment this out. This reduces half of the work. From there, you can add the ...


1

Turn off the cPanel redirect. Not sure what it is doing or how. But clearly it is not working right. Create an .htaccess file in your sub-domain root directory with: RewriteEngine on RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] ...in it. Obviously change example.com to your domain name. That should do what you want. If you do not know where ...



Only top voted, non community-wiki answers of a minimum length are eligible