My requirement is when user create account he should have own user friendly url with all the services of main site. Please have a look on http://www.grandlakerx.com/ I have created a account on above site with user ID : miraclebpo and it created a user friendly url: http://www.grandlakerx.com/miraclebpo with all the services of http://www.grandlakerx.com/
Well its technically possible basically if ur script is like this index.php?username=coolguy we can use modrewrite and make it like www.yourdomain.com/coolguy
thanks for your reply, I want to rewrite index.php?username=coolguy to index.php/coolguy and the user should have own price setting right for the contents of the main site through his admin login.
Like if main site have Amoxicillin 30 Capsules - $143.05 The user should have right to set his own pricing in his www.mydomain.com/index.php/coolguy
not now... This is my .htacces file content # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName inetrevolution.com AuthUserFile /home/inetrevo/public_html/_vti_pvt/service.pwd AuthGroupFile /home/inetrevo/public_html/_vti_pvt/service.grp What line to add?
Options +FollowSymLinks RewriteEngine on RewriteRule (.*)/$ /index.php?username=$1 The above code This will make urls like http://www.yoursite.com/index.php?username=coolguy to http://www.youriste.com/coolguy
I have created .htaccess file but its not working please tell me whats the error # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName 0532.co.in AuthUserFile /home/co0532/public_html/_vti_pvt/service.pwd AuthGroupFile /home/co0532/public_html/_vti_pvt/service.grp Options +FollowSymLinks RewriteEngine on RewriteRule (.*)/$ /header-pages.php?page=$id
My php file contains.. <li><? $id=$row2["id"];?><a href="header-pages.php?page=<?echo urlencode($id);?>" ><? echo $row2[pagename]; ?></a></li>
Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.[^/]*) /header-pages.php?page=$1 [NC,L] PHP:
Options +FollowSymLinks RewriteEngine on RewriteRule (.*)/$ index.php?username=$1 try this.. can u tell us ur site it will be easier
are u trying to rewrite this page into a better url ?? edit If u use Options +FollowSymLinks RewriteEngine on RewriteRule history/$ header-pages.php?page=5 then http://0532.co.in/header-pages.php?page=5 will be accesable at http://0532.co.in/history/
First of all tell me which .htaccess file i have to edit coz i have htaccess file in folders like.. public_html _vti_cnf _vti_txt _vti_adm etc...
This is my public_html .htaccess code which was already present.. # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName 0532.co.in AuthUserFile /home/co0532/public_html/_vti_pvt/service.pwd AuthGroupFile /home/co0532/public_html/_vti_pvt/service.grp My requirement: When user click on contact us, holy city, history etc.. pages of my site http://www.0532.co.in the address bar shows url like http://0532.co.in/header-pages.php?page=2 http://0532.co.in/header-pages.php?page=3 http://0532.co.in/header-pages.php?page=4 etc.. I want to rewrite it like http://0532.co.in/header-pages/2.html http://0532.co.in/header-pages/3.html http://0532.co.in/header-pages/4.html etc... Please post complete .htaccess file or tell me any other server right do i need to perform Mod_rewrite operations?
Well ok use this .htaccess file # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName 0532.co.in AuthUserFile /home/co0532/public_html/_vti_pvt/service.pwd AuthGroupFile /home/co0532/public_html/_vti_pvt/service.grp Options +FollowSymLinks RewriteEngine on RewriteRule header-pages/(.*).html$ header-pages.php?page=$1 Code (markup): after that u have to change ur script files only and then u will be able to access the pages with the url u want
Sorry for disturbing u... This is my script code where shuld i made change? Coz i used above .htaccess file but issue not solved.. <? $sql2="select * from pages where id between 1 AND 7"; $result2=mysql_query($sql2); while($row2=mysql_fetch_array($result2)) { ?> <li><? $id=$row2["id"];?><a href="header-pages.php?page=<?echo urlencode($id);?>" ><? echo $row2[pagename]; ?></a></li> <? } ?>
Change <li><? $id=$row2["id"];?><a href="header-pages.php?page=<?echo urlencode($id);?>" ><? echo $row2[pagename]; ?></a></li> to <li><? $id=$row2["id"];?><a href="http://0532.co.in/header-pages/<?echo urlencode($id);?>.html" ><? echo $row2[pagename]; ?></a></li>
Thanks friend you saved me but there is some problem with banner and other files please chek it http://0532.co.in/header-pages/1.html