User Tools

Site Tools


creating_clean_profile_url_s

Profile URL's

The .htaccess file included in the script rewrites profile URL's so they look like this … yoursite.com/username instead of looking like this … yoursite.com/profile.php?uid=1

Note: This will only work if your host allows mod rewrites.

Open the .htaccess file located in your main Etano directory and the default profile rewrite code looks like this:

 <IfModule mod_rewrite.c>
Options FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1 [L]
</IfModule> 

Note - if your script is installed in a subdirectory on your server and the above code doesn't seem to work then you might also need to include a RewriteBase statement, like so:

RewriteBase /subdirectory_name
<IfModule mod_rewrite.c>
Options FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1 [L]
</IfModule> 

Be sure to change the "subdirectory_name" to the subdirectory name used on your server.

Another potential issue is if your host has "mod_deflate" turned off in your hosting account, in which case you can try changing the following line:
Options FollowSymLinks
to this:
Options +FollowSymLinks -MultiViews


If it still doesn't work, you can also try removing the following lines from the htaccess file:

php_flag session.use_cookies on
php_flag register_globals off
php_flag session.use_trans_sid off

creating_clean_profile_url_s.txt · Last modified: 2015/12/06 15:13 by admin