Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Wilson Edwards
at 2026-04-19 03:28:10
Point:500 Replies:11 POST_ID:829410USER_ID:12108
Topic:
apche;centos;httpd and www
Some online http and www checker is passed the test or but some are not
What is eaxct method to test redirect correctly ?
Author: Wilson Edwards replied at 2026-04-19 18:19:50
using curl that is better to test real redirect not through browser..to test your redirect configuration in .htaccess/httpd.conf correct or not
Author: Wilson Edwards replied at 2026-04-19 18:17:21
test redirect on browser that may not be accurate becoz of cache data, u need clear all browser data before test.
if uses this as follows in index.php
header("Strict-Transport-Security: max-age=16070400; includeSubDomains");
HTTP Strict Transport Security (HSTS)isa security policy mechanism that forces web browsers to connect to a website exclusively over HTTPS. It prevents attackers from downgrading secure HTTPS connections to insecure HTTP, protecting against man-in-the-middle attacks and cookie hijacking. HSTS is enabled via a special HTTP response header, which tells browsers to only use HTTPS for a set period.
Accepted Solution
Author: Wilson Edwards replied at 2026-04-19 17:43:02
curl -I https://www.yourdomain.com
curl -I http://www.yourdomain.com
curl -I http://yourdomain.com
curl -I www.yourdomain.com
it shoud output "HTTP/1.1 301 Moved Permanently";
if not work, try to see correctServerName,ServerName www.example.com for www
# 1. The redirection block for www
<VirtualHost www.example:80>
ServerName www.example.com
Redirect permanent / http://example.com/
</VirtualHost>
# 2. Your main site block for non-www
<VirtualHost example.com:80>
ServerName example.com
DocumentRoot /var/www/html
# ... rest of your configuration ...
</VirtualHost>
it also works
# 1. The redirection block for www
<VirtualHost *:80>
ServerName www.example.com
Redirect permanent / http://example.com/
</VirtualHost>
# 2. Your main site block for non-www
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/html
# ... rest of your configuration ...
</VirtualHost>
Reference:
//test index.php and image in gzip or not
curl -I -H "Accept-Encoding: gzip" https://yourdomin.com/image/28_192x192.png
curl -I -H "Accept-Encoding: gzip" https://yourdomin.com/index.php
it should output "gzip"
/* set zlib.output_compression=On in /etc/php.ini if use php zip then enable follows */
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) {
ob_start("ob_gzhandler");} else {ob_start();}