fantomel Posted September 29, 2009 Share Posted September 29, 2009 hello i'm building a website and i have a new folder structure on it which require apache htaccess files the first file should redirect to public_html folder and the second one should be used for loading all pages inside of index.php and the link should be the form of index.php?url=home&lang=en can you please check it out and see if it's done correctly ? thank you very much this file goes inside of public_html file and it's for redirecting all the calls to index.php and load pages there. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.*)$ index.php?url=$1 [PT,L] </IfModule> this code is for redirecting to public html <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ public_html/ [L] RewriteRule (.*) public_html/$1 [L] </IfModule> oh i alomost forgot i don't know if i have url rewriting on it i'm beginner to htaccess files.... Link to comment https://forums.phpfreaks.com/topic/175902-folder-redirect/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.