Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

mod rewrite and 301

How to 301 mod rewrite rule

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

Junior Member

10+ Year Member

joined:Oct 30, 2002
votes: 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 Sept 6, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 7, 2004
votes: 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 Sept 6, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
votes: 0


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



Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members