Skip to content

Commit ec93151

Browse files
Small fixes again
1 parent 9d82881 commit ec93151

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

readme.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
[![Total Downloads][ico-downloads]][link-downloads]
55
[![Build Status][ico-travis]][link-travis]
66

7-
It is important to remove trailing slashed from applications made with laravel and it is bad for SEO as Google registers page twice, once with slash and once without it. The correct behaviour is to create 301 for ever page with trailing slash to avoid content duplication in search results.
7+
It is important to remove trailing slashed from applications made with laravel and it is bad for SEO as Google will index your page twice, once with slash and once without it. The correct behaviour is to create 301 for ever page with trailing slash to avoid content duplication in search results.
88

99
Here is the source: https://developers.google.com/search/blog/2010/04/to-slash-or-not-to-slash
1010

1111
## Before you start
1212

13-
An easy way to check if your app is behaving properly would be to create a test route in ``routes/web.php`` like this:
13+
An easy way to check if your app is behaving properly is to create a test route in ``routes/web.php`` like this:
1414

1515
```
1616
Route::get('/foobar', function () {
17-
return 'This is not good!';
17+
return 'simple test';
1818
});
1919
```
2020

2121
Then visit this endpoint with trailing slash ``yourapp.test/foobar/``
2222

23-
If "This is not good!" was displayed and trailing slash did not dissapear from your url in the browser then Google will not be happy about it.
23+
If "simple test" was displayed and trailing slash did not dissapear from your url in the browser window then Google will not be happy about it and you need to fix it.
2424

2525
## Installation
2626

@@ -34,9 +34,11 @@ $ composer require aurawindsurfing/slashremovemiddleware
3434

3535
This package will auto register itself in Laravel 6 and higher.
3636

37-
Now repeat the same test and you should be redirected to the same url but without trailing slash ``yourapp.test/foobar`` and see the same text.
37+
Now repeat the same test.
3838

39-
Now Google will not index every single page of your app twice.
39+
You should be redirected to the same url but without trailing slash ``yourapp.test/foobar`` and see the same text.
40+
41+
Now Google will only index every page once.
4042

4143
## Change log
4244

0 commit comments

Comments
 (0)