Welcome Guest, Not a member yet? Register   Sign In
Redirect another view using htaccess
#1

(This post was last modified: 03-07-2017, 12:26 AM by rupamhazra.)

Hi all,

I want to access a link

http://localhost/controller/function/product_id -->  view 
to
http://localhost/same_controller/same_fu...oduct_name --> same view open.

Using Htaccess.
Reply
#2

Why .htaccess? Just setup a route to do it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Create file in your Codeigniter folder then save as ".htaccess" 
then paste this...

RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ ./index.php/$1 [L]
Reply
#4

@rupamhazra: why?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB