.htaccess — Trailing slash and characters after file extension

I’ve got some weird usability warnings popping up in my search console for pages which don’t actually exist on my site. It looks like someone is creating 100’s of malformed links to my pages.

Here’s the problem.

Say I have https://example.com/pagename.html

Someone is creating hundreds of links with random text after the filetype like this: https://example.com/pagename.html/randomtext

Strangely, with that malformed URL, part of the page renders, but renders with broken styling for some reason. (Triggering search console warnings for every one of those "pages"). I’m not really sure how or why these broken URLs are rendering at all. My understanding is that this should return a 404 error. But it doesn’t.


I’m trying to solve the problem with .htaccess like this:

RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$   /$  1 [L,R=301] 

That sort of works. It removes the trailing slash from https://example.com/pagename.html/ but it doesn’t fix https://example.com/pagename.html/randomchars

How do I get it to ignore all characters following the file type? (except standard GET strings starting with a ?)

Thanks in advance.

Engine and Networking question for a arpg/hack and slash game [closed]

I would like to develop an ARPG / Hack and Slash multiplayer game in the future. It’s supposed to be an isometric game. There should be several divisions so that players always encounter other players of the same level.

For example:

Division 5: Level 1-20

Division 4: 21-40

You should either come to a map through a server browser or, if none is selected via the browser, come across one randomly. Each map is the same size and looks only slightly different. At the edges of the map, the player should have the option of being ported to another map (to the edge of the map) through a hatch. The edge of the map is a safety zone.

My question would be: Which engine should I use? Unity, Unreal …

And what would be the best solution for networking? Dedicated server? ….

(The player should not be able to host their own server or create a lobby)

How to Create file name with Slash in it for Path traversal attack?

Yes I’ve read forums that says Forward Slash (/) is invalid character in a file name since it being File Separator in Windows and *nix based machines. But Without creating such an exploit file, I think attacks like ZipSlip won’t be possible, Isn’t it?

Most Zip Slip attacks involve creating an File with a slash character and when languages like Java use File IO with ZipEntry name, writes to some directory other than intended. So how is this possible?

Ref : https://snyk.io/research/zip-slip-vulnerability

How do I let players know that not every encounter has to be hack and slash? [duplicate]

My players kind of have a habit of, “If it walks like a duck and talks like a duck, WE MUST KILL IT!

Recently they came across a small goblin camp and one of them (who speaks goblin) verbally bluffed the goblins into thinking he was their leader coming back from a meeting or some such business. “Brilliant,” I thought, “let’s see where they take this”… Into an ambush it turned out.
Or in another example they learned of an enemy supply caravan heading from one town to another in a couple of days, so they ambushed it the road, rather than thinking of another option.

Now I have no problem with this whatsoever, I’m still new to DMing, not yet great at the role-play side of things in any case, running a published campaign, am running things more or less by the book, which my players don’t seem to mind, and the caravan combat at least is in the book.

I guess what I’m getting at is; How do I encourage players to think outside the combat box and how do I, as the DM, give them other options without blatantly saying something like “maybe they don’t want to fight”?

To hopefully make things a little more clear and to give another example, of which the PCs haven’t actually come across yet.
Say the PCs are camping in the forest and whoever’s on watch hears wolves howling and getting closer, whether they wake the others up or not my lead in woud be something like;

Eventually there’s a rustling in the bushes nearby and you see pairs of glowing red eyes that seem to watch your movement. After a minute or two a pack of wolves stalk out from behind the bushes and into the light of your camp fire, their eyes set with ravenous hunger and their jaws dipping with saliva.

How can I open up the possibility that if the PCs offer up some of their own food supplies than the wolves would be complacent and either back off or stick around for the night in the warmth of the fire and help protect the PCs?
Not looking for answers specifically relating to that scenario but hopefully you get the idea.

Are slash commands suitable for non-tech users of enterprise software

More and more user interfaces seem to offer technical commands and shortcuts like

  • /remind (Slack)
  • /away (Teams)
  • /assign (Gitlab) …

I was wondering if I should introduce such shortcuts in the graphical user interface of our industry software as well. I personally really like them but I fear that they are way too technical for non computer science – oriented people.

Is my fear legitimate? Is there any data on how such commands are used by non-technical users like accounting, human resources, designers, … ?

How to remove trailing slash from Magento 2 url

I have installed ssl in my Magento 2 store and configured base url to the https version.

But when accessing http version, Magento redirecting url with appending trailing slash.

For example:

My domain is example.com

Base url saved in configuration is https://www.example.com

When I accessing http version http://www.example.com/contactus.html

it is redirecting to https://www.example.com/contactus.html/

Could you please help to remove the trailing slash while redirecting.

Replace source word with containing /(forward slash) to destination word in VI editor command window

I’m facing problem while cmake compilation wherein, there are thousands of /root/repo/ are there & I want to replace with /repo/ . Because of / in the source word the command


is not working. Kindly guide here about how to proceed.

sample input : A line in the file contains


It should look like


I’ve tried below command inside file, but it doesn’t work as expected.