开发者

.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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜