Здравствуйте! есть адрес такого типа - http://modx.test/index.html?act=go&quest=1 как прописать в htaccess следующее правило: 1 - http://modx.test/ - домен может менятся 2 - index.html - адрес страницы может менятся (скрипт вызывается на разных страницах) 3 - $_GET['act'] может быть go или end 4 - $_GET['quest'] это целое число от 1 до хз... Последний раз пробовал так: Код (Text): RewriteRule ^/([_A-Za-z0-9]+)/([_A-Za-z0-9]+)$ ?act=$1&quest=$2 [L,QSA,R] и так Код (Text): RewriteRule ^.htaccess$ - [F] RewriteCond %{QUERY_STRING} ([_A-Za-z0-9]+)/([0-9]+) RewriteRule ^index\.html?$ index.html?act=$1&quest=$2 [L] и даже так Код (Text): RewriteCond %{QUERY_STRING} ^act=go$ RewriteRule ^(.*)$ /test-start.html? [R=301,L] RewriteRule ^test-start.html/$ /test-start.html? [R=301,L] RewriteRule ^/test-start/ act=go Последний этот пример работает, но отдает 404 ошибку. И там еще quest не передан. Я немного в замешательстве. Подскажите, пожалуйста код htaccess Код (Text): # For full documentation and other suggested options, please see # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions # including for unexpected logouts in multi-server/cloud environments # and especially for the first three commented out rules #php_flag register_globals Off AddDefaultCharset utf-8 #php_value date.timezone Europe/Moscow Options +FollowSymlinks RewriteEngine On RewriteBase / # Fix Apache internal dummy connections from breaking [(site_url)] cache RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC] RewriteRule .* - [F,L] # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin #RewriteCond %{HTTP_HOST} . #RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] #RewriteRule (.*) http://www.example.com/$1 [R=301,L] # without www #RewriteCond %{HTTP_HOST} . #RewriteCond %{HTTP_HOST} !^example\.com [NC] #RewriteRule (.*) http://example.com/$1 [R=301,L] # Exclude /assets and /manager directories and images from rewrite rules RewriteRule ^(manager|assets|js|css|images|img)/.*$ - [L] RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L] # For Friendly URLs RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] # Reduce server overhead by enabling output compression if supported. #php_flag zlib.output_compression On #php_value zlib.output_compression_level 5
да, конечно http://modx.test/index.html?act=go&quest=1 и http://modx.test/index.html?act=end в http://modx.test/index/test-go/1 И http://modx.test/index/test-end (по окончанию тестирования) то есть адрес 1 вопроса тестирования имеет вид http://modx.test/index.html?act=go&quest=1 2 вопроса http://modx.test/index.html?act=go&quest=2 3 вопроса http://modx.test/index.html?act=go&quest=3 =) если на другой странице то http://modx.test/drugaya_stranica.html?act=go&quest=1