main.php Configure Yii to ignore Path

Hi,

I have a question, how may i configure in Yii to ignore a path, like, if we go to yourdomain/members/*** it really goes to the folder members in yourdomain instead of going for the controller members action *****.

Thank you,

David Fernandes

I am not an expert in server configuration/htaccess, but I think, that if you hided index.php with fx htaccess, you will probably need to use htaccess as well to tell, that you don’t want index.php to be loaded if a certain folder comes after your yourdomain/

Best,

Sune

As Sune said, it seems you are using Apache’s “mod_rewrite”. My reply is based on this assumption. If you are not using Apache or not mod_rewrite, then please describe your environment.

Your .htaccess (or other some apache config file) contains something like:




	<IfModule mod_rewrite.c>

		RewriteEngine on

		# if a directory or a file exists, use it directly

		RewriteCond %{REQUEST_FILENAME} !-f

		RewriteCond %{REQUEST_FILENAME} !-d

		# otherwise forward it to index.php

		RewriteRule . index.php

	</IfModule>



Insert these 2 lines after "RewriteEngine on":




		# Skip URL rewriting for paths beginning with "/members/"

		RewriteCond %{REQUEST_URI} !^/members/



See mod_rewrite’s documentation for an explanation.