Jump to content

jbrennan

New Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by jbrennan

  1. This should get you the URL structure you are looking for.

     

    RewriteEngine On
    RewriteCond %{REQUEST_URI}  ^/user\.php
    RewriteCond %{QUERY_STRING} username=([a-zA-Z0-9]*)
    RewriteRule ^(.*)$ http://www.test.com/%1? [L
    

     

    The url only works when you type "www.mysite.co.uk/1245ady"

     

    Based on that statement, I am going to guess you are using Joomla. If so, Joomla inserts the row id in the URL string for it's SEF urls. It then retrieves and uses that to return the appropriate content for the page. Changing only this id in the url will return a different row from the database, even without changing the rest of the URL.

     

    You will likely have to change a sql query to use the "username" column rather than the "U_id" column to lookup the users information for the page.

     

    If you not using Joomla, what platform are you using.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.