php - htaccess rewrite on localhost -


i have problem .htaccess file, problem have site on localhost , path is: localhost/site/sitename/html/login.php?ref=company , after uploading server be:

www.site-name.com/login.php?ref=asdas 

what needd rewrite ref looks (in both cases): path_to_site/company/login.php company $_get['ref'] ex. have url:

localhost/site/sitename/html/login.php?ref=cola

and want have this:

localhost/site/sitename/html/cola/login.php how it?

try if works you:

rewritecond %{http_host} ^(.*)/$login.php$ rewriterule ^(.*)$ http://www.site-name.com$1 [r=301,l] 

i hope understood want correctly. check if have enabled , configured on server correctly. @ http://httpd.apache.org/docs/current/mod/mod_rewrite.html more information if youre using apache.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -