# URL Rewrites

<div align="left"><img src="https://626170148-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJEKoY_RLJk3C3Fcnu6%2F-MKAp4OHqU-3exwbJPC8%2F-MKEz34EdQLuLYOiF180%2Fsupported2.png?alt=media&#x26;token=b9b5e5d0-1000-4f93-af86-6197df550798" alt=""></div>

{% hint style="info" %}
**PRO TIP 🚀**

Use the test cases below to test your ScandiPWA App!
{% endhint %}

With URL Rewrites you change any URL that is associated with a product, category, or CMS page. When the rewrite goes into effect, any links that point to the previous URL are redirected to the new address.&#x20;

### Configuring URL Rewrites <a href="#urlrewrites-configuringurlrewrites" id="urlrewrites-configuringurlrewrites"></a>

URL rewrites make it possible to make existing URLs more “search engine friendly” and also easier for humans to read. Magento routinely uses URL rewrites to remove the file name “index.php” that normally appears in the URL just after the root folder. When Web Server Rewrites are enabled, the system rewrites each URL to omit “index.php.”&#x20;

By default, Web Server Rewrites are **always enabled** in ScandiPWA. You will never see the URL of your stores appear with the "index.php" part. Therefore, **NOTE!** the **Use Web Server Rewrites** setting is deprecated in ScandiPWA.&#x20;

### Automatic Product Redirects <a href="#urlrewrites-automaticproductredirects" id="urlrewrites-automaticproductredirects"></a>

Your store can be configured to automatically generate a permanent redirect whenever the URL key of a product or category changes.&#x20;

Redirects to the new address after changing the URL are supported by ScandiPWA out of the box!

{% hint style="success" %}
**TEST YOUR SCANDIPWA APP**

To verify the support for this section, use the following **test cases:**
{% endhint %}

{% file src="<https://626170148-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJEKoY_RLJk3C3Fcnu6%2F-M_UyUOIlK4MMzZw7NtE%2F-M_VHsjYlX__sCrrWi8e%2Fscandipwa_%20ScandiPWA%20-%20URL%20Rewrites.pdf?alt=media&token=2eb5e934-4b5c-48d4-8bb0-2ebc4cf74fd9>" %}
URL Rewrites - Test Cases
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.scandipwa.com/v5.1.1/seo-and-search/url-rewrites.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
