+ Reply to Thread
Results 1 to 3 of 3




  

Thread: .htaccess Help

      
  1. #1
    I'm New! glnutrition is on a distinguished road glnutrition's Avatar
    Join Date
    October 12, 2009
    Location
    Michigan
    Posts
    3
    Rep Power
    0
    Feedback Score
    0

    Default .htaccess Help

    I am trying to get my blog links:

    Code:
    blog.php?id=12345
    To work using:

    Code:
    blog12345.php
    I tried this but it gives me an 500 error.

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule blog(.*)\.php$ /blog.php?id=$1
    Anyone have any ideas how to get this to work?

  2. #2
    I'm New! hostseller is on a distinguished road
    Join Date
    October 15, 2009
    Posts
    1
    Rep Power
    0
    Feedback Score
    0

    Default Re: .htaccess Help

    Quote Originally Posted by glnutrition View Post
    I am trying to get my blog links:

    Code:
    blog.php?id=12345
    To work using:

    Code:
    blog12345.php
    I tried this but it gives me an 500 error.

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule blog(.*)\.php$ /blog.php?id=$1
    Anyone have any ideas how to get this to work?



    If you have a URL like "h tt p ://www.example.com/index.php?id=1234&page=12" and you want to turn it into "h tt p ://www.example.com/index/1234/12" you can do this with mod_rewrite.

    To do this you simply put the following in your .htaccess file:

    RewriteEngine On
    RewriteRule ^index/(.*)/(.*)/ /index.php?id=$1&page=$2


    Well, in your case please also make sure that your Apache web service supports mod_rewrite.


    Regards,
    Last edited by Halobitt; Oct 15th, 2009 at 8:57 am.

  3. #3
    Super Moderator tsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to behold tsdesigns's Avatar
    Join Date
    February 6, 2008
    Location
    Scotland
    Posts
    1,078
    Rep Power
    6
    Feedback Score
    0

    Default Re: .htaccess Help

    Your just missing a ^ before the word "blog"

    That should make it work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Role of .htaccess in SEO
    By virtuagurl in forum Search Engines
    Replies: 9
    Last Post: Oct 28th, 2010, 1:45 am
  2. htaccess query?
    By Purple Rain in forum Web Hosting
    Replies: 8
    Last Post: Dec 24th, 2008, 7:51 am
  3. Block IPs via HTACCESS
    By Zap in forum Web Hosting
    Replies: 7
    Last Post: Oct 6th, 2008, 4:03 pm

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
WebTalkForums
WebTalkForums
Recent Forum Threads