Forum Moderators: phranque
Lets say I have a page called /static.html. So this is the static page...I then write the page in mediawiki which is dynamic. So the output from mediawiki will be called folder/dynamic. I then want to change the name of "folder/dynamic" to static.html but I do not want the page to redirect to static.html, I just want the name of the page to change, so it keeps the contents of folder/dynamic
This is what I sort of want, but is not quite right:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^static\.html$ folder/dynamic [R=301,L]
Can someone direct me on how to just change the name without redirecting the page? Thanks!
However, you will need to make sure your content-creation script outputs static links when creating pages. Mod_rewrite can change the incoming requested URL, but it cannot change the URLs on your pages, and these are the URLs seen by users and search engines.
Redirect:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^static\.html$ http://www.example.com/folder/dynamic [R=301,L]
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^static\.html$ /folder/dynamic [L]