G
G
gm25852016-06-08 16:43:20
Apache HTTP Server
gm2585, 2016-06-08 16:43:20

How to configure .htaccess to hide value in address bar?

Tell me please!
There is a website at mysite.ru/~ih123456/shop/.
On the server in /home/ih123456/public_html is .htaccess.
CMS Prestashop itself is installed in /home/ih123456/public_html/shop
File contents: .htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.ru$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mysite\.ru$
RewriteRule ^ /?$ "http\:\/\/mysite\.ru\/mysite" [R=301,L]
301 redirect was made so that when you enter mysite.ru in the address bar, the address mysite.ru/~ih123456/ opens shop/ with a deployed CMS, without this redirect, the mysite.ru address was opened, in which there was a shop directory, when clicked, mysite.ru/~ih123456/shop/ was opened and the CMS was launched.
The question is, how can I hide the value "/~ih123456/shop/" in the address bar when surfing the site?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Ilyasov, 2016-06-08
@gm2585

I think something like this:

RewriteRule ^~ih123456/shop/$ http://%{HTTP_HOST}/shop/ [R=301,L]
RewriteRule ^shop/$ /~ih123456/shop/ [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question