How can I forward a url such as:
to the appropriate page:
http://www.mysite.com/JoinOptions/MemberRegistration.aspx
Is there some way to do this?
I'm using a DNN CMS but if you're unfamiliar with DNN and still have a solution for redirecting that would be helpful.
Thanks,
Matt
If you are on IIS, you can use ISAPI_Rewrite3 tool. The .htaccess for the site will be:
If you are using Apache you can create or edit an existing .htaccess file containing:
And place it in your root directory (the directory that http://www.mysite.com/ points to) It may be useful to read up on Apache .htaccess files and mod_rewrite in addition to this.
Edit: Oops. Didn't check the tags.
We once used a DNN module from SnowCovered, you can get it here: http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&PackageID=7262
It's $15 but it will do what you need to without any coding.
You will create a page that is
/Join
and redirect it to/JoinOptions/MemberRegistration.aspx
Yet another option. Probably a little bit more of a hack than the accepted answer.
Enable wildcard mapping in IIS
This allows extensionless URLs to work (e.g. http://yoursite.com/Join)
Create a page in DNN called "Join" and redirect it to the desired page
Add a page with the name/title Join, set it to not show up in the menu, and set it to 301 redirect to your desired URL (these are all options in the page's settings)
* typically something like C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
You can create a "friendly URL rule" within DNN. In the Host Settings page, open the Friendly URL section within the Advanced Settings section. From there you can add a new rule, that matches
.*/Join/Default.aspx
and replaces it with~/JoinOptions/MemberRegistration.aspx
(I'm fairly sure that using that style of URL will work, but I know that you can replace with a URL like~/Default.aspx?tabid=423
).Using this scheme, you need to make sure that IIS lets ASP.NET process the request. The easiest way to do that is to add a "Join" folder in your file system with a file called Default.aspx.
Actually without touching IIS and without spending any money you can do this with a little trickery.
add the code below
If you change the Page name you would have to re-edit the file but it works
note:might have to replace the amersan amp with an actual ampersand