homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

mod rewrite and 301
How to 301 mod rewrite rule

 9:24 am on Sep 6, 2004 (gmt 0)

I have some pages that are dynamically generated that i would like to redirect to another page name.

The url currently looks like


The number at the end of this url is different for all links.

I want to show the link as

[domainname.com...] and also permantely redirect the url [domainname.com...] to [domainname.com...]

Can this be done?



 10:17 am on Sep 6, 2004 (gmt 0)

I am not so good in modrewrite and 301 is still new for me, so it is just a guess for the 301 redirect.

This the PHP method for a 301 redirect.
Just put these lines at the beginning of file and give it a try.

if(isset($_GET["ID"])) {$ID=$_GET["ID"];} else {$ID="1";}
header("HTTP/1.1 301 Moved Permanently");


 4:13 pm on Sep 6, 2004 (gmt 0)


It can't be done the way you're expecting to do it. See this thread for more info: [webmasterworld.com...]


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved