Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

278.Advanced search and replace -- How to make specified change for .htaccess file?

User: editor -- 2008-10-09          << 277  279 >>
Hits: 494
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to make specified change for .htaccess file?
Input Sample:
redirect 301 /index/index.htm http://www.test.com
redirect 301 /index/anotherpage.htm http://www.test.com/anotherpage
...
Output Sample:
RewriteRule ^(/index/index.htm)$ http://www.test.com [L,R=301]
RewriteRule ^(/index/anotherpage.htm)$ http://www.test.com/anotherpage [L,R=301]
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. click ctrl-o open your source .htaccess file

2. click ctrl-h open "Replace" dialog
1)set "Replace Unit" to "Chars"
2)set "Replace Scope" to "Line"
3)enter following in search for pattern:

4)enter following in replace with pattern:


3. click "Replace" button, done! save file by yourself.
Download Script:  scripts/278.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to batch extract specified lines from a text file? (64%)
How to extract all lines with specified date range from text file? (62%)
How to remove some specified characters from multiple filenames? (61%)
How to extract all specified links from a html file? (61%)
How to search and replace words in specified column in csv file? (59%)
How to exract specified strings started with www from text file? (59%)
How to extract all specified date format from a text file? (59%)
How to add some number to the specific column in csv file? (58%)

Check Demo of Advanced search and replace
Keywords:
access  acc  dir  replace scope  scope  chars  char  change  enter  save  htaccess search replace  htaccess search and replace  change 2  search and replace open source  search replace  search file  search 2  file replace