Changing htaccess RewriteCond to allow access to specific file in otherwise blocked directory to use php variables in css
By
wwwouter, in General Support
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By Zendex
Hi,
I am trying to make a site for a studio, and I wanted to set a specific hover effect for my text. I want the background of the text to be lit up in the full height of the nav bar but it doesn't do it. I showed the expected result in the png in the attached files. I will also set the code here below, the top part is a css reset.
HTML:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Zendex</title>
<link href="style.css" rel="stylesheet" type="text/css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Offside&display=swap" rel="stylesheet">
</head>
<body>
<div id="nav_bar">
<div id="Zendex">ZENDEX</div>
<ul>
<a href="contact.html"><li>CONTACT</li></a>
<a href="films.html"><li>FILMS</li></a>
<a href="about.html"><li>ABOUT</li></a>
<a href="home.html"><li>HOME</li></a>
</ul>
</div>
<div class="main"></div>
</body>
</html>
CSS:
@charset "UTF-8";
/* CSS Document */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
background-color: #6A6969;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
#nav_bar{
overflow: hidden;
position: fixed;
top: 0;
width: 100vw;
height: 125px;
background-color: #484848;
border: solid 1px black;
}
li{
font-size: 24px;
text-shadow: 1px 1px 100px white;
font-family: 'Offside', cursive;
float: right;
margin: 45px 50px 0px 0px;
height: 125px;
}
#Zendex{
font-size: 24px;
text-shadow: 1px 1px 100px white;
font-family: 'Offside', cursive;
float: left;
margin: 45px 0px 0px 100px;
color: azure;
}
#home{
}
#about{
}
#films{
}
#contact{
}
ul{
margin: 0px 50px 0px 0px;
color: azure;
height: 125px;
}
a:link{
color: white;
}
li:hover{
height: 125px;
background-color: #6A6969;
color: white;
}
-
By milo695
Hello,
I've added a class in ProcessPageEditLink but when I call it from Editor (attributes > class) nothing happens.
Also, I've created the class in my custom.css, is there any other css file this class needs to be in?
thanks
-
By theoretic
Hi there! And thanks for Processwire!
I've got an interesting case concerning access to current user page. It appears that PW somehow limits access to the frontend page of current user.
I'm speaking about a specific PW configuration. We have two kind of users: 'regular' users with native user template and member users with specific member template and specific members parent page (by the way, it's so cool that PW allows to use custom user templates and custom parent for certain user pages!). So a member with name Joe has a page with member template and url like /members/joe .
The members template has some access limitations: only member users can see pages with member template. It works like a charm in most situations. For example, user Bill (who has member template and is logged in) can browse a page with url /members/ann which also is a member page with member template.
And now, meet the glitch! The above-mentioned Bill cannot get to his own page /members/bill ! PW generates 404 page instead.
I see no reason for this behavior. From my point of view any member should have access to any member page in this situation. What am i doing wrong? Any advice is welcome!
-
By RDC
Is the right way to get Processwire to skip a folder (ie not process it as its running a different CMS) to put
RewriteCond %{REQUEST_URI} !^/shop/.*$
just before
RewriteRule ^(.*)$ index.php?it=$1 [L,QSA]
in .htaccess?
-
By Spiria
I am writing here instead of the ProCache forum because I have the impression that several nginx experts could solve this. In its new version, Procache proposes new .htaccess rules that are difficult to translate into nginx rules. We currently have a problem with the trailing slash of URLs which gives us a bad score in SEO analysis tools such as semrush.com.
Indeed, a canonical URL is either without or with "/", but cannot be served by both options. Although ProcessWire without ProCache respects this rule, ProCache has no difficulty serving both, which is considered an SEO optimisation fault. I believe that ProCache version 2 solves this problem with these new rules, but I can't understand the following. Does anyone have any idea how to translate this into a nginx rule?
Attached also the whole proposed .htaccess for ProcessWire.
# PROCACHE v2/31885be14d6cfb4b2b0d3e533260bded -------------------------------------------------- RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteRule ^.*/$ - [E=pwpcstep:pour,E=pwpcname:index] RewriteCond %{ENV:pwpcstep} "=pour" RewriteCond %{HTTP_COOKIE} !^.*(wire_challenge|wires_challenge).*$ RewriteRule ^.*/$ - [E=pwpcstep:stir,E=pwpcpath:%{DOCUMENT_ROOT}/site/assets/ProCache-00478359c5e65dbada1075bfbd4] RewriteCond %{ENV:pwpcstep} "=stir" RewriteCond %{ENV:pwpcpath}/$0/%{ENV:pwpcname}.html -f RewriteRule ^.*$ - [E=pwpcstep:drink,E=pwpcfile:$0/%{ENV:pwpcname}.html] RewriteCond %{ENV:pwpcstep} "=drink" RewriteRule ^(.*) %{ENV:pwpcpath}/%{ENV:pwpcfile} [L] <ifModule mod_headers.c> Header set X-PWPC "ProCache" env=pwpcstep Header set X-Powered-By "ProcessWire CMS, ProCache" env=pwpcstep </ifModule> RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$" # /PROCACHE -------------------------------------------------------------------------------------
.htaccess-procache
-