What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Put the broad rewrite in location / and create an exact-match exception for the URI you want to preserve. The = modifier makes NGINX stop location selection at that URI, so /special-url is handled without the broader rewrite. This works only when the rewrite is not already running in the server context; a server-level rewrite executes before location matching and must be changed or excluded in its own rule.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
The standard exact-URL exclusion
For one path, use an exact location and keep the catch-all rewrite in a separate prefix location:
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesserver {
location = /special-url {
try_files $uri =404;
}
location / {
rewrite ^ /index.php last;
}
}
location = /special-url matches that normalized URI exactly. The request is therefore handled by the first block instead of entering location /, where the rewrite to /index.php would otherwise occur.
The exception handler is only an example. Replace try_files $uri =404; with the response or routing behavior that the special endpoint actually needs. The important part of the exclusion is the exact-match location and the placement of the general rewrite inside the broader location.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Why the equals modifier works
NGINX evaluates locations in a defined order: exact matches first, then prefix matches, then regular-expression locations. The = modifier defines an exact URI match, and location selection stops as soon as that match is found. Because /special-url is selected before location /, the broad rewrite never runs for that request.
This is more precise than adding a conditional inside a catch-all location. It describes the routing exception in the location tree itself, which makes the intended precedence visible and avoids using rewrite-phase conditionals for ordinary path selection.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →What counts as the same request
Location matching uses the normalized URI and does not include the query string. A request such as /special-url?x=1 still matches location = /special-url. The query string is therefore not a reason to add separate exact locations.
The scope caveat that decides whether the pattern works
NGINX rewrite directives can run in either server or location context. The phase matters more than the apparent order of blocks in the configuration file.
Rewrite inside a location
When the general rule is inside location /, NGINX first selects a location and then executes the rewrite in that location. The exact exception wins during selection, so the broad rule is skipped:
server {
location = /special-url {
try_files $uri =404;
}
location / {
rewrite ^ /index.php last;
}
}
This is the preferred arrangement when you control the configuration. It separates the exception from the general application routing and lets the normal location precedence do the work.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Rewrite at server level
A rewrite in the server block runs sequentially before NGINX searches for a location. In that situation, an exact location cannot undo a URI change that has already happened. For example:
server {
rewrite ^ /index.php last;
location = /special-url {
try_files $uri =404;
}
}
Here, the server-level rewrite processes the request before the exact location can be selected. Moving the broad rule into location / is the cleanest fix. If moving it is impossible because of an included configuration or a shared server block, put the exception directly into the server-level rule.
Excluding at server scope with a negative regular expression
A negative lookahead can prevent the server-level rewrite from matching the protected path:
server {
rewrite ^(?!/special-url(?:$|/)).* /index.php last;
location = /special-url {
try_files $uri =404;
}
}
The lookahead says that the rewrite must not run when the URI begins with /special-url followed by either the end of the URI or a slash. As written, it protects both /special-url and descendants such as /special-url/child. If only the single URI should be exempt, use a boundary that ends at that exact path and test it against the deployed configuration. Conversely, if the entire subtree is intended to bypass routing, make that scope explicit rather than relying on an accidental prefix match.
Choose what the exception should do
An exact location only selects the request. Its directives determine the result. Use the smallest handler that matches the endpoint’s purpose.
| Requirement | Typical handler | Result | Important detail |
|---|---|---|---|
| Fixed response or redirect | return |
Sends a status and optional body or redirect immediately | Use when no file lookup or application routing is needed |
| Static file or directory | try_files |
Checks candidate paths and can return an error | Use an explicit fallback such as =404 when missing content should not enter the application |
| Application endpoint | try_files with a named location |
Checks for a file, then routes to an application handler | A named location avoids another URI-based location search |
Fixed status or redirect with return
For a health response, maintenance marker, or permanent redirect, use return directly in the exact location:
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
location = /special-url {
return 200 'okn';
}
The directive can also issue redirects. Because the response is generated immediately, there is no file lookup and no need for an application fallback.
Static content with try_files
For a file-backed endpoint, let NGINX test the requested path and fail explicitly when it is absent:
location = /special-url {
try_files $uri $uri/ =404;
}
try_files checks each candidate in order. The $uri candidate covers a file, $uri/ covers a directory, and =404 returns a not-found response instead of sending the request through the general application rewrite.
Application routing with a named fallback
If the exception should reach an upstream application only after the file check, use a named location:
location = /special-url {
try_files $uri @app;
}
location @app {
proxy_pass http://backend;
}
The named location is selected as the fallback target without changing the public URI. This is useful when the endpoint has special pre-routing behavior but still belongs to the application stack.
Excluding an entire path subtree
An exact location is intentionally narrow. If every URI below a prefix must bypass regular-expression locations, use a ^~ prefix location:
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
location ^~ /assets/ {
try_files $uri =404;
}
location / {
rewrite ^ /index.php last;
}
The ^~ modifier tells NGINX not to continue to regular-expression locations after the longest matching prefix has been selected. This matters when another regex location could otherwise capture an asset request and apply a rewrite. The prefix in this example covers /assets/...; it does not make a separate assertion about a bare /assets URI, so decide whether that path needs its own exact location or redirect.
Slash variants, query strings, and normalized paths
Query strings do not change the location match
Because the query string is excluded from location matching, /special-url, /special-url?x=1, and /special-url?mode=full all select the same exact location. If the application needs different behavior by parameter, handle that distinction inside the selected endpoint rather than adding query-string variants to the location tree.
A trailing slash is a different URI
/special-url and /special-url/ are not the same exact match. If both forms must bypass the rewrite, define both behaviors deliberately:
location = /special-url {
try_files $uri =404;
}
location = /special-url/ {
try_files $uri $uri/ =404;
}
Alternatively, choose one canonical form and return a redirect from the other exact location. Do not assume that an exact match for the slashless form automatically covers the slash-suffixed form.
Free tools Windows power users keep installed
One-click scans. No signup required.
Subpaths need an explicit boundary
Decide whether a protected endpoint means one URI or a family of URIs. A rule intended only for /special-url should not silently exempt /special-url/child. A rule intended for the family should state that boundary in either a prefix location such as ^~ /special-url/ or a carefully tested server-level regular expression.
NGINX matches the normalized URI, so percent-encoded or otherwise normalized path forms should be tested through the actual server. The configuration should protect the URI as NGINX sees it, not only the spelling used in a browser bookmark.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Rewrite ordering and repeated location searches
Rewrite directives in one context are processed sequentially. A rewrite using the last flag changes the URI and starts another location search. That second search can enter a different location and run another rewrite, so a configuration that looks like a single exception may still loop through multiple routing stages.
NGINX limits rewrite processing to 10 cycles. Hitting that limit indicates a routing loop, not a successful exclusion. Common causes include rewriting to a URI that is caught by the same broad rule, placing the exception only on the original URI when the rewritten URI also needs protection, or combining server-level and location-level rules without checking their combined order.
Keep the broad rewrite in one clearly identified context, use a named location when a fallback should not trigger another URI search, and inspect every included rule that can run before or after the exception.
Complete configuration patterns
Static endpoint preserved from a front-controller rewrite
server {
listen 80;
server_name example.test;
location = /special-url {
try_files $uri $uri/ =404;
}
location / {
rewrite ^ /index.php last;
}
}
This arrangement serves the special URI through the file checks and sends other requests to the front controller. A missing special file produces a 404 rather than being rewritten to /index.php.
Fixed response alongside the general route
server {
location = /special-url {
return 200 'okn';
}
location / {
rewrite ^ /index.php last;
}
}
The exact endpoint returns the configured response, while every URI that reaches the broad location follows the normal rewrite.
Application fallback without a public URI rewrite
server {
location = /special-url {
try_files $uri @app;
}
location @app {
proxy_pass http://backend;
}
location / {
rewrite ^ /index.php last;
}
}
If the file is absent, the named location sends the request to the backend. The broad URI rewrite remains available for unrelated paths.
Recommended Free Tools
Quick Recap
How to verify the exclusion safely
- Check the active configuration. Confirm whether the broad rewrite appears in
servercontext, inlocation /, or in an included file. The exact-match solution depends on that scope. - Validate syntax before reload. Run the NGINX configuration test used by your deployment process, commonly
nginx -t. Fix every reported error before applying the change. - Inspect the expanded configuration. On installations that support it,
nginx -Tprints the complete active configuration, including included files. Search that output for every occurrence of the rewrite and for competing regex locations. - Test the exact URI. Request
/special-urland verify the expected status, body, file, or upstream response. Confirm that it did not reach the front controller or unintended backend. - Test a query string. Request
/special-url?x=1and make sure the same exception is selected while the application receives the query parameters it expects. - Test the trailing-slash form. Request
/special-url/. It should either follow an explicitly configured rule or receive the deliberate redirect or error you selected. - Test a child path. Request
/special-url/childto confirm whether descendants are supposed to be exempt. This catches an overly broad negative lookahead or an accidentally narrow exact location. - Test a normal path. Request an ordinary URI and verify that the general rewrite still occurs. An exclusion that protects the special endpoint but disables application routing globally is not correct.
- Review logs after reload. Check access and error logs for unexpected redirects, upstream requests, missing files, or repeated rewrites. Compare the request URI at each stage when diagnosing a loop.
Troubleshooting common failures
| Symptom | Likely cause | Correction |
|---|---|---|
| The special URL is still rewritten | The broad rule runs in server context before location selection |
Move it into location /, or add the exclusion to the server-level regular expression |
| The slashless URL works but the slash form does not | Exact matching treats the two normalized URIs separately | Add an exact location for the slash form or redirect it intentionally |
| A child path bypasses routing unexpectedly | A negative lookahead or prefix exception includes descendants | Use an exact boundary for one URI, or document and retain the subtree scope if it is intentional |
| A static exception returns an application page | try_files falls through to a general URI fallback |
Use an explicit =404 or a named application fallback in the exception location |
| A regex location captures the supposedly protected prefix | The prefix was not marked with ^~ |
Use location ^~ /prefix/ when the whole prefix must bypass regex locations |
| Requests loop or end with the rewrite-cycle limit | A last rewrite sends the URI into another rule that rewrites it again |
Trace each new URI, remove the recursive match, or route the fallback through a named location |
| The configuration test fails after adding the exception | Syntax, quoting, context, or an included-file conflict | Read the reported line, verify that each directive is valid in its context, and inspect the expanded configuration |
Decision checklist
- Use
location = /pathwhen exactly one normalized URI must bypass a rewrite. - Keep the broad rewrite in a location whenever possible so location precedence can select the exception first.
- If the rewrite must remain at server scope, exclude the URI in that server-level rule; an exact location cannot reverse an earlier URI change.
- Choose
returnfor a fixed response or redirect,try_filesfor file and directory checks, and a named location for an application fallback. - Use
^~ /prefix/when a whole prefix must bypass regular-expression locations. - Test query strings, trailing slashes, descendants, normal application routes, included configuration files, and rewrite-cycle behavior against the active server.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




