Adding Header Extra Content - Access is denied

Permalink
I am trying to add 2 external stylesheets and 1 external script to only 1 page. When I put them I get "access is denied".

Here's how I'm adding it:

<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/stylesheet1.css" />
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/stylesheet2.css" />
<script src="<?php echo $this->getThemePath(); ?>/js/script.js"></script>

Am I missing something?

View Replies:
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Where are you adding that code?
wilfordbrimley replied on at Permalink Reply
In the extra header content attributes field.
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
You cannot place PHP code there, only HTML.

Hardcode the theme path instead.
wilfordbrimley replied on at Permalink Reply
I tried that also and still getting "access denied ". In fact anything I type there is not accepted (random letters etc). Any other ideas? Thanks
Stulk replied on at Permalink Reply
I am trying to add content to the extra header and it's not working either. I can type a <!-- comment, or just put words like "what happens when I put something here"

But when I try and do html or scripts, etc. it gives me an "access denied" message.
<!-- Sets the Logo for Google's Knowledge Graph -->
   <link rel="alternate" href="tulk.us" hreflang="en-us" />
       <script type="application/ld+json">
       {
         "@context": "http://schema.org",
         "@type": "Organization",
         "url": "http://tulk.us",
         "logo": "http://tulk.us/conc/application/files/4814/3472/6019/TLLCICON2BW.png"
       }
       </script>
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
I wonder if its something your host's mod_security is flagging.
Stulk replied on at Permalink Reply
Cool. That totally worked. Turned off the module in CPanel and it's working perfectly now.

Thanks!
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Ask your web host if your site has triggered mod_security recently, as you are getting Access Denied when inserting HTML into a form.
wilfordbrimley replied on at Permalink Reply
The mod_security is a problem through my host (Namecheap) as well. I always just start a live chat with them and they fix it. Until I do this I can't add tracking codes, most extra header content, or include certain terms in a page title (like "seo" or "poker", both of which I've had legitimate reasons to use before).

I figured out the Facebook thing btw, I hardcoded it to the page template. Thanks for the help.