Showing posts with label SEO friendly. Show all posts
Showing posts with label SEO friendly. Show all posts

Friday, 31 December 2021

SEO tips for 2022


Today I am sharing best seo tips for 2022. These are the very short and effective tips which will works for you.

So let's read the below seo tips for 2022 which definaltly work for new website.

  • 1. Nice Domain name
  • 2. Purpose and design
  • 3.keyword research
  • 4. Set the keywords in Title and content
  • 5. Use pure HTML with no broken any tags
  • 6. Use H1 to H6 tag in your content
  • 7. Unique title and content for each page
  • 8. Internal link and external link
  • 9. update fresh content frequently
  • 10. About and Contact us page
  • These are the simply seo tips you should follow and it will increase organic traffic as well as product selling.

Thursday, 31 July 2014

Remove .aspx from url in asp.net

Remove or hide .aspx from url in asp.net


In this article I will explain how to remove or hide .aspx from URL in asp.net. Remove or hide .HTML from url in asp.net OR Remove or hide .HTM from url in asp.net. if you want to remove or hide .aspx extension from url in asp.net then
you need to use  URL routing concept in asp.net.

but if you don't want to use URL routing in your code then you can use following code.

The main purpose of this task is make URL as SEO friendly.

Remove html or htm from url using code.

Other Articles - Step by step solution


=> Add Global.asax file in your website or project

=> And add following code in your global.asax file


void Application_BeginRequest(object sender, EventArgs e)
{
    String WebsiteURL = Request.Url.ToString();
    String[] SplitedURL = WebsiteURL.Split('/');
    String[] Temp = SplitedURL[SplitedURL.Length - 1].Split('.');

    // This is for aspx page
    if (!WebsiteURL.Contains(".aspx") && Temp.Length == 1)
    {
        if (!string.IsNullOrEmpty(Temp[0].Trim()))
            Context.RewritePath(Temp[0] + ".aspx");
    }
    /* // This is for HTML page
    if (!WebsiteURL.Contains(".html") && Temp.Length == 1)
    {
        if (!string.IsNullOrEmpty(Temp[0].Trim()))
            Context.RewritePath(Temp[0] + ".html");
    }
    // This is for HTM page
    if (!WebsiteURL.Contains(".htm") && Temp.Length == 1)
    {
        if (!string.IsNullOrEmpty(Temp[0].Trim()))
            Context.RewritePath(Temp[0] + ".htm");
    }*/
 }


=> Copy following div tag in your .aspx page , here you have to use page name only without .aspx extension



<div>
    Remove .aspx from asp.net website
    <a href="Default">Click</a>
    <%--Here write only page name without extension --%>
</div>


=> You can also redirect page without extension


protected void Page_Load(object sender, EventArgs e)
{
        Response.Redirect("Default");
}
 


Asp.net tutorials