Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

SEF URL's using htaccess / modrewrite / php ? help

422422 Developer MVP
edited July 2012 in Vanilla 2.0 - 2.8

Working on a site, and I need to generate search engine friendlt URL's

So I have the url currently as:
http://mywebsite.com/blog/read.php?art_id=11

I need to change it to its corresponding SEF url. like so:
http://mywebsite.com/blog/Why-do-Australians-pay-so-much-for-Cars-?

The question mark is part of the title, and we could remove these if its a issue.
Any suggestions please ?

Also not sure if the read.php? can be dropped ??

There was an error rendering this rich post.

Comments

  • peregrineperegrine MVP
    edited July 2012

    it's not clear to me what you want. do you want a generalized conversion? or a specific conversion or just that url.
    Or do you want your read.php to convert the file and send it to the new SEO Url.

    Not that I know very much about .htaccess.

    form what you said I think you want to do this.
    but essentially you need to rewrite.

    read.php?art_id=11
    
    to 
    Why-do-Australians-pay-so-much-for-Cars-
    
    and obviously would be a functional url  - correct.
    http://mywebsite.com/blog/Why-do-Australians-pay-so-much-for-Cars-
    ---
    
    
    if its is generalized how would art_id=number 
    

    correlate to a subject.

    if you had

    read.php?art_id=11/Why-do-Australians-pay-so-much-for-Cars-

    to

    Why-do-Australians-pay-so-much-for-Cars-

    and needed to convert with .htaccess it would make more sense to me.

    What is your blog software?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.