Welcome! Log In Create A New Profile

Advanced

help with codeigniter rewrite

Posted by sn4k3 
help with codeigniter rewrite
February 01, 2010 10:30AM
i tried very things but without success
so im requesting help with that

i need rewrite CodeIgniter php framework urls
APACHE .htaccess:

[code]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /licitar/

# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

#RewriteEngine on
#RewriteCond $1 !^(index\.php|images|captcha|scripts|menu|css|js|assets|robots\.txt)
#RewriteRule ^(.*)$ /licitar/index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule>
[/code]

Also now can i make alias, tried many things but dont work :(
[code]
Alias /phpmyadmin "D:/wamp/apps/phpMyAdmin-3.2.5-all-languages/"

# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#

<Directory "D:/wamp/apps/phpMyAdmin-3.2.5-all-languages/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
[/code]



Thanks
Re: help with codeigniter rewrite
February 03, 2010 08:43AM
In answer to first question something like this should work:

location / {

root /home/user/public/codeigniter;
index index.php index.html;

if (-f $request_filename) {
break;
}

if (!-e $request_filename) {
rewrite ^(.*)$ /licitar/index.php?$1 last;
}

error_page 404 /licitar/index.php;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 108
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready