.htaccess: Redirect without changing url

1- Use [P] instead of [L]

2- Use $s at the end of second line to have a set of urls redirects and remove / at the end of it too.

The code will look like this:

RewriteCond %{REQUEST_URI} ^/tour
RewriteRule ^(.*)$ /$1 [P] 

which treats with more than the index page of the folder tour.


Because you provide a full URL in your rewrite rule it is automatically treated as a redirection. Replace the full URL with just a slash and it should work, i.e.:

RewriteCond %{REQUEST_URI} ^/tour
RewriteRule ^(.*)$ / [P] 

You can even shorten it down to:

RewriteEngine on
RewriteRule ^/?tour.* / [P]