2
Мне нужно было создать новое правило для htaccess. Я написал это. Но я нашел проблему с WSDL. Когда я использую новое правило, у меня есть некоторые проблемы с подключением к WSDL. Я не знаю причин. Но я должен это исправить.Исключить url из rewriterule
Могу ли я написать в HTAccess что-то такое, как (псевдокод):
if (http://www.mywebsite.com/mywebaplication/src/webServiceInstances.php?someGetParam) {
RewriteRule ^([^\/]*)$ index.php?route=$1 [QSA]
} else {
(RewriteRule...)
RewriteRule ^([a-zA-Z]+)\.(html|xml|json|jhtml)$ public/index.php?module=$1&controller=Index&action=index&format=$2 [QSA]
RewriteRule ^([a-zA-Z]+)$ public/index.php?module=$1&controller=Index&action=index&format=html [QSA]
}
Благодарим за ответ.
EDIT: это вся моя старая переписывают
<IfModule mod_rewrite.c>
RewriteEngine On
#php public/index.php -mconfigure
RewriteBase /webaplication/src/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\/]*)$ index.php?route=$1 [QSA]
</IfModule>
это вся моя новая переписывают
<IfModule mod_rewrite.c>
RewriteEngine On
#php public/index.php -mconfigure
RewriteBase /mywebaplication/src/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#new way: module controller method format
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)/([a-zA-Z]+)\.(html|xml|json|jhtml)$ public/index.php?module=$1&controller=$2&action=$3&format=$4 [QSA]
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)/([a-zA-Z]+)$ public/index.php?module=$1&controller=$2&action=$3&format=html [QSA]
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)\.(html|xml|json|jhtml)$ public/index.php?module=$1&controller=$2&action=index&format=$3 [QSA]
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)$ public/index.php?module=$1&controller=$2&action=index&format=html [QSA]
RewriteRule ^([a-zA-Z]+)\.(html|xml|json|jhtml)$ public/index.php?module=$1&controller=Index&action=index&format=$2 [QSA]
RewriteRule ^([a-zA-Z]+)$ public/index.php?module=$1&controller=Index&action=index&format=html [QSA]
#old way(this works for wsdl)
RewriteRule ^([^\/]*)$ index.php?route=$1 [QSA]
Спасибо. Это помогло. –
Добро пожаловать, рад, что это сработало для вас. – anubhava