User Tools

Site Tools


profile_url_s

This is an old revision of the document!


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 depending on how your server is configured 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: (Note - these php flags are no longer included in the .htaccess file as of Etano 2.3)

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

For more info also see: The .htaccess File

profile_url_s.1463851803.txt.gz · Last modified: 2016/05/21 12:30 by admin