Welcome Guest, Not a member yet? Register   Sign In
Better Urls?
#1

[eluser]lszanto[/eluser]
Hey, I am just needing a bit of help with .htaccess/mod_rewrite and wanted to know how do I configure my webserver/.htaccess file so that instead of showing /index.php/mypage it will skip the index.php so your url would be http://yourpage.com/codeigniter/mypage.

Thanks in advance.
#2

[eluser]danoph[/eluser]
This is my .htaccess file on my website:

Code:
Options +FollowSymLinks
RewriteEngine on

#rewrite condition 1
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^bizwidgets\.biz
RewriteRule (.*) http://bizwidgets.biz/$1 [R=301,L]

#rewrite condition 2:
RewriteCond $1 !^(index\.php|images|css|blog|downloads|ice|demos|user_guide|_js|uploads|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

The first condition removes the www from the URL, making it shorter, and the second condition removes index.php from the URI string, while allowing direct access to folders like images, css, blog, downloads, etc...




Theme © iAndrew 2016 - Forum software by © MyBB