F
F
fStrange2021-06-30 12:22:34
htaccess
fStrange, 2021-06-30 12:22:34

How to remove part from url?

I have a link
https://site.com/games/games/StreamingAssets/aa/se...

Dubbed /games .
And I can’t fix the link, so I want to fix it using .htaccess. It is necessary that https://site.com/games/StreamingAssets/aa/settings.json

be given . Now .htaccess is standard

RewriteBase / 

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2021-06-30
@fStrange

And what prevents you from checking that the url starts with games/games/ and changing it? Something like this: Use above last rule with redirecting everything to index.php.
RewriteRule ^games/games/(.*) games/$1 [R=301,QSA]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question