Rewrite a folder name using .htaccess don’t want to work

I am wondering, why folder renaming doesn’t work. RewriteRule ^pl/(.*) public/$ 1

Lets say I have a url like: 

Now I want to rewrite the url to 

"pl" is not a folder rather just a name!

The rest works fine. Why just that one rule doesn’t work?

my .htaccess

RewriteEngine on RewriteRule ^dekoracyjne.html$   decorative.php [NC,L] RewriteRule ^pl/(.*) public/$  1 RewriteRule ^dekoracyjne/(.*) decorative/$  1 RewriteRule ^techniczne.html$   architectural.php [NC,L] RewriteRule ^techniczne/(.*) architectural/$  1 RewriteRule ^show.html/([-\w]+)$   show.php?id=$  {products:$  1} [L] RewriteRule ^p.html$   product_configurator.php [NC,L] RewriteRule ^show_c\.html/([-*\w]+)$   show_c.php?cat=$  {catcolors:$  1} [L] RewriteRule ^(product_configurator)\.html/(\d+)&([-\w]+)$   $  1.php?prometheus_id=$  2&id=$  {products:$  3} [L] RewriteRule ^(ss_c)\.html/(\d+)&([-\w]+)$   $  1.php?prometheus_id=$  2&id=$  {products:$  3} [L] # Rewrite other ".html" requests to ".php" RewriteRule (.+)\.html$   $  1.php [L] 

Identified Folder does not reduce in size over time

Hi @Sven

I am trying to figure out how to exhaust my identified folder to make it all verified (how to find more verified faster).

When I monitored over last 2 days, with a project that only uses Identified links, these are my folder sizes:

Day 0 
Identified 494mb
Submitted 549mb
Verified 829mb

Day 2
Identified 511mb
Submitted 572mb
Verified 857mb

My expectation would be the Identified folder reduces in size as  links are deleted from this folder when they are submitted/verified, however the Identified folder is increasing in size instead??

Am I missing something?

Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project

My Path: C:\Users…….\Desktop……\coding\font-awesome-4.7.0\css

my header code:


<div id="slideout-menu">     <ul>         <li>             <a href="<?php echo site_url(''); ?>">Home</a>         </li>         <li>             <a href="<?php echo site_url('/blog'); ?>">Blog</a>         </li>         <li>             <a href="<?php echo site_url('/projects'); ?>">Projects</a>         </li>         <li>             <a href="<?php echo site_url('/about'); ?>">About</a>         </li>         <li>               <input type="text" placeholder="Search Here">         </li>     </ul> </div>  <nav>     <div id="logo-img">         <a href="#">             <img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" alt="GTCoding Logo">          </a>     </div>     <div id="menu-icon">         <i class="fa fa-bars"></i>     </div>         <ul>             <li>                 <a href="<?php echo site_url(''); ?>"                     <?php if(is_front_page()) echo 'class="active"' ?>                 >Home</a>                          </li>             <li>                 <a href="<?php echo site_url('/blog'); ?>"                 <?php if(get_post_type() == 'post') echo 'class="active"' ?>                 >Blog</a>             </li>             <li>                 <a href="<?php echo site_url('/projects'); ?>"                 <?php if(get_post_type() == 'project') echo 'class="active"' ?>>Projects</a>             </li>             <li>                 <a href="<?php echo site_url('/about'); ?>"                 <?php if(is_page('about') == 'post') echo 'class="active"' ?>                 >About</a>             </li>             <li>                 <div id="search-icon">                     <i class="fa fa-search"></i>                             </div>             </li>         </ul>     </div> </nav>   <div id="searchbox">     <input type="text" placeholder="Search Here"> </div>   <?php if(is_front_page()); { ?>    <main>  <?php } ?> 

wp_enqueue_style not working if the file is in a sub folder

I use wp astra to customize our site and have set up a child theme but for some reason, the wp_enqueue_style is not working if the file is in a subfolder.

When I view source the page, it does output the URL like this <link rel='stylesheet' id='my-css-css' href='https://my-domain-url/wp-content/themes/astra-child/assets/css/style.css?ver=1.1' media='all' /> but when I click and visit the URL I get 404 page not found.

Here’s the wp enqueue code.

wp_enqueue_style( 'my-css-css', get_stylesheet_directory_uri() . '/assets/css/style.css', array('astra-theme-css'), '1.1', 'all' ); 

This one works if I put the file inside the main folder of the child theme.

wp_enqueue_style( 'my-css-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), '1.1', 'all' ); 

Can anyone help and explain why it doesn’t work?

Thank you in advance! Cheers!

Laravel | Why create a public_html folder and link/move it?

I am using laravel on shared hosting.

Under my domain in my folder is the laravel app.

Now I see online that many people do weird stuff with the laravel public folder, they either move it to a different location or create a sys link, but why?

Isn’t the laravel setup secure? As far as I understand nothing below the public folder can be accessed.

I simply put my laravel app into the domain folder and linked the domain to laravel/public.

I even asked my provider and they confirmed it that this is the way to go.

But I am really paranoid about security, why many other people do it differently, maybe they have different setups?

Major security and usability flaw in Linux (root privileges and sudoers, folder access restriction, Ubuntu Linux)

Alright, let me give you the context. I am a business owner with strong technical background, say a programmer, though not an advanced system administrator. I’ve bought a VPS server where I want to host several applications and webpages. One of the apps consists of backend, admin frontend and user frontend, another one is just backend and frontend. So 5 different programmers develop those apps. From time to time, as the development takes its place, those programmers need to install and upgrade some packages, modify system configs and so on, i.e. they need ssh access and some root privileges.

And here is the tricky part. It is obvious that I don’t want them to see and gain access to the folders they are not supposed to see, i.e. the devs of the first app shouldn’t have access to the folders of the second app and vice versa. Moreover the backend dev of the first app shouldn’t have access to the frontend folders of the same app and the same goes for the second app. Also I would like to restrict access for them to certain commands like visudo or reboot, so they wouldn’t be able to lock me out of my own server or reboot it without my consent.

Now, if I give them sudo privileges for them to be able to run administrative tasks needed for their development – then they have access to everything and it becomes practically impossible to restrict access for them to certain folders and commands. On the other hand if I DON’T give them sudo privileges, then it becomes a huge pain for me to every time install packages and give them access to certain files and commands they need to continue development. There are over 1500 commands and the corresponding number of system files in Linux they could potentially need access to, so it’s very VERY unconvenient for me to spend so much time to administer the VPS, especially getting the fact that I’m not a very advanced system administrator and I don’t have much time because I need to run my business.

There are already numerous posts and threads on the Internet where people try to find solutions to somewhat close problems like these: One, Two, Three, Four, Five, Six, Seven, Eight, Nine, and they still have no reasonable solutions to them, only those that involve some supercomplex activities and anyway not giving a needed result.

So from my point of view as a business owner it should be something like this: there is a root user who can do everything. He can create admins and define access rights for them, for example in that very sudoers file. Then it’s his decision whether to give access to an admin to the sudoers file itself and any of the folders and commands of his choice. For example an admin could be able to run any command in the system except “reboot” and “visudo” and he can access all files and folders except /etc/sudoers and say /var/www/private_folder even WITH sudo privileges invoked (meaning he can’t even copy those files, overwrite them, chmod and chown them and so on, i.e. access them with any command).

That would immediately make the whole system administration A LOT more easier and logical, eliminating the need for complex solutions like chroot jails, separate bash environments, splitting servers into virtual machines, using containers and so on. And it’s so simple, a matter of a couple of conditions in the code, if I understand it correctly from a developer’s perspective. Also, I want to be in control of my VPS, not having to trust any other third person believing he/she won’t steal my information and/or destroy my whole system either by making a mistake or intentionally and basically it can be considered as a serious security vulnerability from a certain point of view.

This seems so obvious and logical for me, that I was really discouraged and embarrassed that it’s really isn’t like that in Linux. Maybe 20 years ago when Linux was created it was enough to have only a root and sudoers and the rest of users to accomplish tasks they had at that time, but today everything goes a bit different way already and that archaic approach is not usable anymore.

Of course I realize I can understand something wrong and there is a strong reason why it has to be as it is, then please let me know why is it so and what is a correct and easy way of solving my problem described above without a need to build a behemoth on my VPS or manually administering it all the time by myself. After all it should be user-friendly, right? Now it’s not.

On the other hand if there is no such a solution, then I would really be willing to even pay someone who could implement some kind of a patch or a package that will allow to solve this problem.

How can I add attributes to all characters in a folder and set them to a default value?

I recently decided to consolidate my macros that refer to a character’s gender by pronoun into a single one using attributes on the character sheet (ie subjective, objective, possessiveA, and possessiveP) and am looking for a way to loop through each character in a folder and add those attributes to each of them and set them to a default of {it, it, its, and its} respectively. Is there any way I can do that? I do have api access if it’s required to do it.