.htaccess - codeigniter htaccess 301 -


hi have normal htaccess file codeigniter , want 301 1 url another

i've had obfuscate links able post :(

ie h2tp://www domain com/controller/method/value1 ->h2tp://www domain com/controller/method/value2

but i'm having hell of time...

here's htaccess

    <ifmodule mod_rewrite.c>         rewriteengine on         rewritebase /          rewriterule ^(home(/index)?)/?$ / [l,r=301]         rewriterule ^(.*)/index/?$ $1 [l,r=301]           #removes trailing slashes          #had remove ajaxquery search else fails         rewritecond %{request_filename} !-f         rewritecond %{request_filename} !-d         rewritecond %{request_uri} !(search/ajaxsearch)         rewriterule ^(.+)/$ $1 [l,r=301]           #rewrite non-www www based filenames         #should rid of canonical issues         rewritecond %{http_host} ^domain\.es [nc]         rewriterule ^(.*)$ http://www.domain\.es/$1 [r=301,l]           #removes access system folder users.         #additionally allow create system.php controller,         #previously not have been possible.         #'system' can replaced if have renamed system folder.         rewritecond %{request_uri} ^system.*         rewriterule ^(.*)$ /index.php?/$1 [l]          #checks see if user attempting access valid file,         #such image or css document, if isn't true sends         #request index.php         rewritecond %{request_filename} !-f         rewritecond %{request_filename} !-d         rewriterule ^(.*)$ index.php?/$1 [l]        </ifmodule>      <ifmodule !mod_rewrite.c>         # if don't have mod_rewrite installed, 404's         # can sent index.php, , works normal.         # submitted by: elliothaughin          errordocument 404 /index.php     </ifmodule>[/code][/quote] 

if put

    redirect 301 /controller/method/value1 h2tp://www domain com/controller/method/value2  

i

h2tp://www domain com/controller/method/value2?controller/method/value1

i've been hours on now, it's killing me :)

due complete lack of knowledge on htaccess trying add 301 redirects below these lines.

    #checks see if user attempting access valid file,     #such image or css document, if isn't true sends     #request index.php     rewritecond %{request_filename} !-f     rewritecond %{request_filename} !-d     rewriterule ^(.*)$ index.php?/$1 [l] 

all checks had been run , [l] flag stopping anymore checks being run.

so when posted normal 301 redirect above following lines worked.

    #removes access system folder users.     #additionally allow create system.php controller,     #previously not have been possible.     #'system' can replaced if have renamed system folder.     rewritecond %{request_uri} ^system.*     rewriterule ^(.*)$ /index.php?/$1 [l] 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -