• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirect another view using htaccess

#1
Hi all,

I want to access a link

http://localhost/controller/function/product_id -->  view 
to
http://localhost/same_controller/same_function/product_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 the CodeIgniter Community in 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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.