born2fr4g born2fr4g - 1 month ago 8
Apache Configuration Question

htaccess rewrite without redirect

All i want to do is to rewrite url from to So under address is displayed content from adress

So when user type, user is not redirected to but content from is displayed under domain (so in adress bar is


You will need to enable mod_proxy in your Apache config for that. Once mod_proxy is enabled, enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.exaple\.cz$ [NC]
RewriteRule ^(hu)/?$ http://www.exaple.$1 [L,P,NC]