Apache Rewrite for index.php and data.php |
[eluser]Lima[/eluser]
As I did before config/config.php Code: $config['base_url'] = "http://www.mysite.com/"; config/route.php Code: $route['default_controller'] = "page"; .htaccess Code: RewriteEngine on So far so good. Now I need to add data.php on root web directory, so now I have index.php and data.php data.php is url based on query string, so I need to enable query string config/config.php Code: $config['enable_query_strings'] = FALSE; if url is http://www.mysite.com/page.html no change so it will redirect to http://www.mysite.com/index.php/page.html by .htaccess if url is http://www.mysite.com/data.php?p1=data1&p2=data2 I need additional .htaccess code to redirect url http://www.mysite.com/data.php?p1=data1&p2=data2 to http://www.mysite.com/data.php?c=datacon...1&p2=data2 Please somebody help me for this case. I don't have knowledge on apache mod_rewrite. Thanks Lima |
Welcome Guest, Not a member yet? Register Sign In |