SEO friendly URL for pages

8 replies
Hi All,

I'm working on a site with several static pages.
Right now the only way I can access these pages is through the page_ID,
like in sitename.com/?page_ID=nnn which is not really SEO friendly.
Does anybody have a way to make those pages available through a "normal" url?:confused:

TIA

Boudewijn
#friendly #pages #seo #url
  • Profile picture of the author SeeSharp
    Hello Boudewijn,

    you need some .htaccess redirect to accomplish your task:
    Code:
    RewriteEngine On
    
    RewriteRule ^?page_ID=(.*)$ whatever-you-want-$1.html
    (Not tested)
    Place this inside the .htaccess file of your main directory

    Then you can have pages like sitename.com/test-this-page-1.html where 1 yould be the id.

    Greetings
    Exterior
    {{ DiscussionBoard.errors[5470310].message }}
    • Profile picture of the author Boudewijn
      Thanks Exterior, I will look at it. Right now it is not clear to me how I can rewrite the URL for several static pages with this. But it is a lead. Let's see where I get.
      {{ DiscussionBoard.errors[5471826].message }}
  • Profile picture of the author Boudewijn
    It actually was a lot easier than I thought.
    Here's what I did.
    I went to the control panel of the site.
    Selected the ffilemanager and through that the web.config file.
    Next I did set the right to write for both the domainname as well as the network services.
    Switch to the admin page of the site (different tab in the browser).
    Set the permalink to %postname%
    save the settings.
    From here on the slug will be used as page ID.

    Then go back to the control panel and reset the rights of web.config to the older format.
    {{ DiscussionBoard.errors[5472264].message }}
    • Profile picture of the author Nochek
      For Posterity, following this paragraph is the htaccess file I use in most of my projects as a base. Just drop it into your main public_html folder and it will auto-add the 3 w's as well as change all calls for ?id=link into SEO friendly version. (I would give more directions, but warriorforum uses Regex to incorrectly find urls in posts and it is really really really pissing me off right now)

      Edit - Argh! Alright, in the following code, replace the word BADREGEX with 3 w's, and then the word WORSEREGEX with the hypertext transfer protocol a semi-colon, two slashes, plus the 3 w's. (This without the spaces -> http : // www )

      Code:
      Options +FollowSymlinks
      RewriteEngine on 
      RewriteBase /
      RewriteCond %{HTTP_HOST} !^BADREGEX.
      RewriteRule ^(.*)$ WORSEREGEX.%{HTTP_HOST}/$1 [R=301,NC]
      RewriteCond %{REQUEST_FILENAME} !-f 
      RewriteCond %{REQUEST_FILENAME} !-d 
      RewriteRule ^(.*)$ index.php?id=$1 [NC]
      Signature
      Nochek Solutions Presents:
      The Hydrurga WSO - Rank Your Site #1 And Score Over The Penguin Updates!
      {{ DiscussionBoard.errors[5498621].message }}
  • Profile picture of the author lordspace
    actually, I have released an open source script that does SEO on the fly.
    it is good for forums and CMS. Pm if interested.
    Signature

    Are you using WordPress? Have you tried qSandbox yet?

    {{ DiscussionBoard.errors[5510845].message }}
  • Profile picture of the author stevenpayales
    I have a different settings on this. You have to enable an allow settings on your httpd.conf file and then create a small PHP script for your URLS.
    Signature
    If you have an urge to build something that could change the world, don’t focus on the money, but the legacy you’ll leave behind.
    Buy Back Telefoane - Get Dinodirect Coupon Codes and shop for LESS!@
    {{ DiscussionBoard.errors[5515454].message }}
  • Profile picture of the author meixiangdaoa
    Right now it is not clear to me how I can rewrite the URL for several static pages with this. But it is a lead.
    {{ DiscussionBoard.errors[5522191].message }}
  • Profile picture of the author todtony
    Are These Links Too Similar for SEO purposes?

    I currently have a url structure on one of my sites that uses a mod rewrite to change dynamic mysql urls from:
    {{ DiscussionBoard.errors[5523082].message }}

Trending Topics