Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REPLACE THIS :
- # Redirection en ajoutant des slashs au urls
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.*[^/])$ /$1/ [R=301,L]
- WITH THIS :
- <IfModule mod_rewrite.c>
- RewriteEngine On
- # Exclude URLs containing wp-json
- RewriteCond %{REQUEST_URI} !^/wp-json/ [NC]
- # Condition to check the requested URL does not correspond to an existing file.
- RewriteCond %{REQUEST_FILENAME} !-f
- # Rule to append a trailing slash to URLs not ending with one.
- RewriteRule ^(.*[^/])$ /$1/ [R=301,L]
- </IfModule>
- With the modified rule, any URL containing wp-json will be exempted from the trailing slash addition.
Advertisement
Add Comment
Please, Sign In to add comment