pgrevents Posted May 9, 2009 Share Posted May 9, 2009 I dunno of this is the right place but here is what I am trying to do current urls are working like this; http://www.pgrevents.co.uk/profile.php?show=pgrated what I want is; http://www.pgrevents.co.uk/pgrated But I was wondering if the above could show me the same results as it would with the show=pgrated for example; www.bebo.com/pgrated takes me to that profile i dot know if any of what i said makes sense to anyone. thanks Paul Quote Link to comment Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted May 9, 2009 Share Posted May 9, 2009 Yes it does make sense You can use a htaccess with mod_rewrite to rewrite your url like that : The user will see this : http://www.pgrevents.co.uk/pgrated While this will be called internaly : http://www.pgrevents.co.uk/profile.php?show=pgrated You need the mod_rewrite module enable and put that in your .htaccess : Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /profile.php?show=$1 [NC,L] </IfModule> Everything that not a file (to prevent other file like css, image, ...) will be rewritten to profile.php?show= Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.