Skip to content
Advertisement

Remove folder name from URL

I have a domain www.domain.com redirected to / in my server.

Next I have index.php whith code:

JavaScript

When I enter mydomain.com I have mydomain.com/v3/ in url.

How to remove v3 from Url

Advertisement

Answer

Remove header line from your PHP code since it is doing a redirect and have this lookahead based rule in your root .htaccess:

JavaScript

Which basically means if request is not starting with /v3/ forward to /v3/ without changing the URL in browser.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement