Redirecting a web site.
by n00b_noob from LinuxQuestions.org on (#5Q354)
Hello,
Is it possible to redirect a web site without an Apache web server? I have a web site and when I entered the domain name in the browser, then it forwarded to my old web site!
I checked my Virtual Host config file, but I can't find anything wrong:
Code:<VirtualHost *:80>
ServerAdmin root@localhost
ServerName www.example2.com
ServerAlias www.example2.com
DocumentRoot /var/www/wp
ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
RewriteEngine on
RewriteCond %{SERVER_NAME} =example2.com [OR]
RewriteCond %{SERVER_NAME} =www.example2.com [OR]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Redirect permanent / https://www.example2.com
TraceEnable off
ServerSignature Off
# SSL
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off
</VirtualHost>
<Directory "/var/www/wp">
# Options -Indexes +FollowSymLinks
Options -Indexes
AllowOverride All
Require all granted
</Directory>When I enter example2.com in my browser, then it forwarded to my old web site (example1.com). Which part of the system must be examined?
Thank you.
Is it possible to redirect a web site without an Apache web server? I have a web site and when I entered the domain name in the browser, then it forwarded to my old web site!
I checked my Virtual Host config file, but I can't find anything wrong:
Code:<VirtualHost *:80>
ServerAdmin root@localhost
ServerName www.example2.com
ServerAlias www.example2.com
DocumentRoot /var/www/wp
ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
RewriteEngine on
RewriteCond %{SERVER_NAME} =example2.com [OR]
RewriteCond %{SERVER_NAME} =www.example2.com [OR]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Redirect permanent / https://www.example2.com
TraceEnable off
ServerSignature Off
# SSL
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off
</VirtualHost>
<Directory "/var/www/wp">
# Options -Indexes +FollowSymLinks
Options -Indexes
AllowOverride All
Require all granted
</Directory>When I enter example2.com in my browser, then it forwarded to my old web site (example1.com). Which part of the system must be examined?
Thank you.