Find an htaccess rule. Please help me write it. Thank you for finding an htaccess rule telindex. php? Id4 is converted to the following 4 _ telindex. php ------ solution -------------------- RewriteEngineonRewriteCond % {REQUEST_FILENAME }! -DRewriteCond % {R: evaluate an htaccess rule. Please help me write it. Thank you.
Find an htaccess rule
/Tel/index. php? Id = 4 to the following:
/4 _ tel/index. php
------ Solution --------------------
RewriteEngine on
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^. */([0-9] +) _ tel/index. php/tel/index. php? Id = $1 [QSA, L]
------ Solution --------------------
([0-9] +), [] represents any number in the range of 0-9!
------ Solution --------------------
Is rewrite_module enabled in the apache configuration file?
------ Solution --------------------
PHP code
Method 1. RewriteEngine onRewriteCond % {REQUEST_FILENAME }! -DRewriteCond % {REQUEST_FILENAME }! -FRewriteRule ^ (. *) $ index. php/$1 [QSA, L] RewriteRule ^ (. *)/([0-9] +) _ tel/index. php $1/tel/index. php? Id = $2 [QSA, L] method 2. RewriteEngine onRewriteCond % {REQUEST_FILENAME }! -DRewriteCond % {REQUEST_FILENAME }! -FRewriteBase/tel/RewriteRule ([0-9] +) _ tel/index. php index. php? Id = $1 [QSA, L]