CodeIgniter Forums
config .htacces to obtain url as fotolog, twiterr, etc... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: config .htacces to obtain url as fotolog, twiterr, etc... (/thread-20949.html)



config .htacces to obtain url as fotolog, twiterr, etc... - El Forum - 07-26-2009

[eluser]Unknown[/eluser]
Hi. I'm doing a solution...
i need that my users enter on the site with like url:

www.myweb.com/user_name


with this .htaccess script, i get hide only the index.php

Code:
# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex  index.php/usuario/

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php $1 [L,QSA]
</IfModule>

how can do it? actually, i haven't idea about .htaccess

i found the following script, but the site isn't made on CI

Quote:RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule ^(.+)$ ver.php?ver=$1

where ver.php is renamed by other string

www.theweb.com/index.php?ver=user_name
to
www.theweb.com/user_name

Thanks for your help..!!