Nette application in subdirectory

Notice: This thread is very old.
wohral
Member | 13
+
0
-

Hello,
I have application situated on subdirectory:

/web1
/web2
/web3 -- Nette application
	/app
	/log
	/temp
	...
	/www
   		.htaccess
	.htaccess

Problem is, that only way how can I access to web, is by domain.com/web3/www, but this is now so nice, Everything what i need is to get to web by domain.com/web3

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 httpd.apache.org/docs/current/mod/quickreference.html)

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

# 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]
</IfModule>

# 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
	</IfModule>
</IfModule>

Thank you to everyone for advice

ODIS
Member | 33
+
0
-

Hello,

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).