SOLVED Need a little basic help with rewrite

Jelf

Member
Jun 26, 2016
24
3
53
Redmond
cPanel Access Level
Root Administrator
findpropertylines.com is a subdomain.
There is an .htaccess file in the root for this subdomain
I edited that file and just after the line
RewriteEngine on
I added the line
RewriteRule ^test$ "https\:\/\/google\.com\" [R=301,L]

I restarted apache and entered the following in my browser

Instead of opening google.com I get a 404.

What am I missing?
 

ankeshanand

Well-Known Member
Mar 29, 2021
194
58
103
India
cPanel Access Level
Root Administrator
Try This:
Code:
RewriteEngine on
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^findpropertylines\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.findpropertylines\.com$
RewriteRule ^test\.html$ "https\:\/\/google\.com\/" [R=301,L]
</IfModule>
Let me know if it works for you!
 
  • Like
Reactions: andrew.n