Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...fix virtual directory / subdirectory in URL to make more friendlyfix virtual directory / subdirectory in URL to make more friendly
Previous
 
Next
New Post
2/15/2009 2:10 PM
 

I host with Godaddy for convenience. I know it's not ideal, but my sites aren't things that businesses run off of... they're just community/organization sites that don't require a ton of features.

Anyway, I was getting annoyed with the fact that Godaddy DNN sites always adds the virtual root as a subdirectory... for example, if you already have a hosting account (ie. www.myoldhostingaccount.com) and want to install DNN in a subdirectory (i.e. www.myoldhostingaccount.com/myNEWsite).... and then redirect www.myNEWsite.com to that directory as the site's root, it would go to www.myNEWsite.com/myNEWsite instead of just www.myNEWsite.com

Here's how you can get around it.

1. In your webconfig, change to the following:

<add key="HostHeader" value="/myNEWsite" />
    <!-- Host Header to remove from URL so "www.mydomain.com/johndoe/Default.aspx" is treated as "www.mydomain.com/Default.aspx" -->
    <add key="RemoveAngleBrackets" value="true" />

2. In your database, find the PortalAlias table and change "www.myNEWsite.com/myNEWsite" to "www.myNEWsite.com"

 

Now your site should get rid of the subdirectory. Hope this helps someone...

 

 
New Post
2/15/2009 4:11 PM
 

I just gave this a go. I couldnt get it to work.

I changed my webconfig to:

    <add key="HostHeader" value="/DotNetNuke" />
    <add key="RemoveAngleBrackets" value="true" />

and change my portal alias column to:

   "localhost"

but whenever i go to //local/host, it redirects me to http://localhost/DotNetNuke/

 
New Post
2/15/2009 4:16 PM
 

ok, i take my last comment back...when i restarted IIS...and i choose to go to //localhost/ it takes me to blank page!!

 
New Post
2/15/2009 4:44 PM
 

After playing around some more, I got the URL's looking even better.  Editing the SQL database is not even necessary in this instance.  Here's what to do to make your site's links look like this:  www.myNEWsite.com/Home.aspx   , www.myNEWsite.com/AboutUs/OurProducts.aspx,  etc

 

1. Add a new portal alias under Amin.. Site Settings.  So you should have:

www.myNEWsite.com/myNEWsite

www.myNEWsite.com

(I also added myNEWsite.com without the "www." as a third alias.)

 

2. Edit web.config in 2 different spots

<add key="HostHeader" value="/myNEWsite" />
    <!-- Host Header to remove from URL so "www.mydomain.com/johndoe/Default.aspx" is treated as "www.mydomain.com/Default.aspx" -->
    <add key="RemoveAngleBrackets" value="true" />

 

and

 

<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlformat="HumanFriendly" />

 

 

 

 

 

 
New Post
2/21/2009 10:53 PM
 

I also tried this solution and it failed to strip out the "/dotnetnuke" out of my url. Below is the portion of my webconfig that I changed as you specified in the last post.

<add key="HostHeader" value="/dotnetnuke" />
        <!-- Host Header to remove from URL so "www.mydomain.com/johndoe/Default.aspx" is treated as "www.mydomain.com/Default.aspx" -->
        <add key="RemoveAngleBrackets" value="true" />
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlformat="HumanFriendly" />

Any ideas?

Also, do you have a running website that has this method successfully applied? If so, I would like to visit the site.

 

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...fix virtual directory / subdirectory in URL to make more friendlyfix virtual directory / subdirectory in URL to make more friendly


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out