What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

Would this htaccess code prevent a link from leaving the website?

bdp31770

New member
On this wordpress page https://stealthvideo.com/test/ the 'click here to view demo' link just under the header is supposed to go to https://cctvconnect.com/demo/cameras/grid
Instead, stealthvideo.com is being inserted in that link so it fails.
I checked the link, there is not stealthvideo.com in the link. I asked the wordpress theme developers, they said if the link is correct then it's probably an htaccess issue. I pasted the htaccess code into chatgpt, it said that code would not prevent a link from 'leaving' the website.
This is the htaccess code:
# BEGIN WP Rocket

# END WP Rocket

# SGS XMLRPC Disable Service
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>
# SGS XMLRPC Disable Service END


#Begin Really Simple Security
Options -Indexes
#End Really Simple Security
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# SGO Unset Vary
Header unset Vary
# SGO Unset Vary END

If anyone knows whether that code would prevent a link from leaving a site, somehow inserting the domain in the front of the url, please let me know. Any feedback is appreciated, thank you.
 
I figured it out, answering here in case anyone else has this problem. A clients wordpress site had some code in the htaccess file that was preventing outbound links from working. The plugins were no longer installed. I copied an htaccess file from a staging site on the same hosting and that fixed the problem.
 
Back
Top