.htaccess foobar.html -> foobar.php
i have to edit an existing web pr开发者_如何学Gooject. This project has only html pages and links to html pages. Ex. from foobar.html is a link to bar.html. Now I have to edit several pages and change the url to bar.php. I dont want to change every
Put a Redirect directive for each one you need to remap in your .htaccess file.
Redirect /junk.html http://yoursite.com/junk.php permanent
Redirect /junk2.html http://yoursite.com/junk.php permanent
Take a look at sed, awk, python to edit/replace the strings your file. In this order ;)
(see: Unix or Cygwin)
精彩评论