3 replies
I want to make my urls more search engine friendly.
How do I change http://www.mywebsite.com/laws.php?state=florida

to http://www.mywebsite.com/florida-laws.php

I have mod rewrite turned on, but i cant get it to work.
#modrewrite
  • Well, I dont know exactly off the top how to do it as xxx-laws/
    but you can do it like this easily

    http://www.mywebsite.com/florida

    --------------------------------------------
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ laws.php?l=$1 [QSA,L]
    {{ DiscussionBoard.errors[4183529].message }}
  • Profile picture of the author ussher
    im not great with these, but maybe something like this in your .htaccess file:

    RewriteRule ^([A-Za-z0-9_.-]+)-laws.php$ laws.php?state=$1 [L]

    Think that should be close.
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
    {{ DiscussionBoard.errors[4184010].message }}
  • Profile picture of the author Harrison_Uhl
    If it is a Wordpress site, change your permalinks.

    Harrison
    {{ DiscussionBoard.errors[4308766].message }}

Trending Topics