.htaccess - Mod_rewrite question -


it possible rewrite url using mod_rewrite , htaccess user enter:

http://www.mainsite.com/12345

which server translate as:

http://www.mainsite.com/index.php?id=12345

by trying remove file extension pages, (remove .php) conflicts , causes never ending redirect:

<ifmodule mod_rewrite.c> options +followsymlinks rewriteengine on rewritebase / rewriterule ^(.*)\.php$ $1 [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^([0-9a-za-z]+)$ index.html?id=$1 [qsa,nc,l,r] </ifmodule> 

rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^([0-9]+)$ index.php?id=$1 

Comments

Popular posts from this blog

python - Does anyone know how to configure the hunpos wrapper class on nltk? -

mysql - How to insert just year and month into date field? -