.htaccess to remove a string within a URL -


i working on website uses dokuwiki , website called miscwiki.

currently of urls structured way

http://www.miscwiki.org/doku.php/something/something 

i use .htaccess rewrite remove doku.php url. have statement not working.

rewriterule ^([^/]+)/doku.php/?(.*)$ /$1 [r=301,l] 

thank on one.

you can use these rules in site root .htaccess:

acceptpathinfo on rewriteengine on  ## uncomment next 2 lines when want remove doku.php/ old links #rewritecond %{the_request} \s/+doku\.php/(\s*) [nc] #rewriterule ^ /%1 [r=301,ne,l]  rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule .+ doku.php/$0 [l] 

Comments

Popular posts from this blog

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -

php - Autoloader issue not returning Class -