Nette application in subdirectory

Notice: This thread is very old.
Member | 13

I have application situated on subdirectory:

/web3 -- Nette application

Problem is, that only way how can I access to web, is by, but this is now so nice, Everything what i need is to get to web by

On hosting I have enable put all files only to /web3 so I am not able to move app, log, vendor and etc to root. Is there any way how to set up in .htaccess to solve my problem. Here is my .htaccess configuration:

.htaccess in /web3

RewriteEngine On
RewriteRule (.*) www/$1 [L]

.htaccess in /web3/www … I tried uncomment RewriteBase / , but it doesnt help

# Apache configuration file (see

# disable directory listing
<IfModule mod_autoindex.c>
	Options -Indexes

# enable cool URL
<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /

	# prevents files starting with dot to be viewed by browser
	RewriteRule /\.|^\.(?!well-known/) - [F]

	# front controller
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz|map)$ index.php [L]

# enable gzip compression
<IfModule mod_deflate.c>
	<IfModule mod_filter.c>
		AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml

Thank you to everyone for advice

Member | 33


your .htaccess configuration seems to be alright – I've just checked it on my localhost Nette sandbox project and it works well.

Is it working for you on localhost? Maybe it can be problem with the configuration on your hosting (disabled module mod_rewrite or something).