J'ai un htaccess existant qui fonctionne très bien:Comment rediriger les URL commençant par/test/vers un script séparé?
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule (.*) /default.php
DirectoryIndex index.php /default.php
Je souhaite modifier cette façon que tous les urls qui commencent par/test/aller à /test/default.php.
Exemple: http://www.x.com/hello.php ->http://www.x.com/default.php Exemple: http://www.x.com/test/hello.php ->http://www.x.com/test/default.php
désolé, n'a pas été assez précis. Je veux que d'autres liens que/test/links continuent d'aller au script original. –
Dans le deuxième exemple, avez-vous besoin de garder les informations 'hello.php'? – Ken
non, ce n'est pas important. –