Regarding htaccess file

software development


Dear Friends,
I need one help urgently.
This is the url but i want to display url friendly manner so that it can be google search friend;ly can any body will be help how i can write htaccess file so that it can help me and where to put that htaccess file.

I would be very grateful for your help.

Thanks in advance.


you’re going to need mod_rewrite, but that’s about all i can tell you until you tell me what you want the url to look like to visitors and search engines and which parts of the actual url you expect to change and how.

track7 - my dream-hosted site


Thank you for your reply.We have one website in that there is many subdomains such as confirmation you can visit the websites.Now you click on any folder in that it will appear in address bar like that But i wwant it to be without ? mark and user friendly same as clean url functionality in drupal.So that it can user friendly.I hope it must be clear to you now.I want same address to appear like Like that.

Kindly help me what should i do and where to put that code. or any if you have any other idea how can we can write the url address in proper way in address bar so that it should user friendly and google search engine.Something is known as url rewriting.


is this the only type of url you would have on the audio subdomain? you’re going to need something that separates the ISKCON and Prabhujis parts as well as the 03 to be in there somewhere. assuming all urls on the audio subdomain look like /index.php?q=f&f=/[number]-[name]_[title] you can do something like this:

RewriteEngine on
RewriteRule ^([0-9]+)/([^/]+)/([^/]+)$ /index.php?q=f&f=/$1_-$2$3

which would work if you link to

you could get even simpler if you use a url like which would use rules like this:

RewriteEngine on
RewriteRule ^(.+)$ /index.php?q=f&f=/$1

searching for apache mod_rewrite will probably give you a lot of general results about how this all works. here’s the mod_rewrite info from the apache site:

also since RewriteRule works on a regular expression you might want to learn about regular expressions if you aren’t already familiar.

track7 - my dream-hosted site


Thank you very mush for youe help. this is working.But problem with this is that when i click on this it gives error it does open audio file inside that.It would be kind of you if you and see the website structure accordingly guide me and give me the code.morever is it possible to represent wesbite address like this. it will more user friendly.

I would be very grateful to you for you kind help.


This is not a simple undertaking. For the URL rewriting as you’ve noticed one needs to look at the URLs for your site to understand the patterns in order to come up with a good set of rules. But its even more complicated than that because the script that generates the HTML pages will also need to be modified as a result. Someone will need to fix it to use absolute URLs for the images and JavaScript files.

Customer since 2000 :cool:


Dear Friend

I am in urgent need of this .if you wish i can send you the the php script that we are using you can modify that.Basically it reads directory and disply them or if you have any php script that reads directory but in address bar it displays as google serach engine.I am sorry to bother you.

Thank you very much for your help.


[quote]if you have any php script that reads directory but in address bar it displays as google serach engine


No, you can’t do that. Barring a serious bug in the web browser, the address bar will always display the address of your site. Why on earth would you want it to display as something else?


I don’t think that is what kanhaiya09 meant; their script obviously takes a path in a query string parameter to scan it for directories or media files. Now they want to hop on the bandwagon and eliminate query strings. So now what is desired is either to modify the script they are using or switch to a different one where “Human Friendly” URLs are supported already.

kanhaiya09 you do not need “Human Friendly” URLs to make your site so-called search engine friendly. The people that run search engines already know how the Web works and have no problem indexing pages at URLs with query strings. For example here is your site at Google.

Customer since 2000 :cool: