SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2011
    Location
    UAE
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirect .htaccess

    Hi , i want to Redirect my page abc.com/abc.html & abc.com/abcd . can any one tell me how to do it with .htaccess ?

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you mean, you want to rewrite all /xyz.html pages as /xyz ?

  3. #3
    SitePoint Member
    Join Date
    Oct 2008
    Location
    Chennai
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by john james View Post
    Hi , i want to Redirect my page abc.com/abc.html & abc.com/abcd . can any one tell me how to do it with .htaccess ?
    Hi,
    You should add this code in your .htaccess file then you can get Pretty URLs

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ $1.html [L,QSA]

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    jj,

    Sorry, I don't understand your question. What do you want to redirect them to?

    If yours is a mod_rewrite question, you can learn almost all you'll ever need to know by going through my signature's tutorial (with its coding examples). Take the time to learn and you'll be rewarded!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •