Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Yesterday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
May 30, 2026
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Query URL problem?
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="galleline" data-source="post: 16546605" data-attributes="member: 170042"><p>Just add .htaccess file to the root folder of your site(for example, /home/domains/domain.com/htdocs/) with following content:</p><p></p><p>[PHP]RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php[/PHP]First, verify that the mod_rewrite module is installed. Then, be careful to understand how it works, many people get it backwards. </p><p> You don't hide urls or extensions. What you do is create a NEW url that directs to the old one, for example </p><p> The URL to put on your web site will be yoursite.com/play?m=asdf </p><p> or better yet </p><p> yoursite.com/asdf </p><p> Even though the directory asdf doesn't exist. Then with mod_rewrite installed you put this in .htaccess. Basically it says, if the requested URL is NOT a file and is NOT a directory, direct it to my script: </p><p></p><p></p><p></p><p>[PHP]</p><p>RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /play.php [L] [/PHP]Almost done - now you just have to write some stuff into your PHP script to parse out the new URL. You want to do this so that the OLD ones work too - what you do is maintain a system by which the variable is always exactly the same <strong>OR</strong> create a database table that correlates the "SEO friendly URL" with the product id. An example might be </p><p> /Some-Cool-Video (which equals product ID asdf) </p><p> The advantage to this? Search engines will index the keywords "Some Cool Video." asdf? Who's going to search for that? </p><p> I can't give you specifics of how to program this, but take the query string, strip off the end </p><p></p><p></p><p></p><p>[PHP]</p><p>yoursite.com/Some-Cool-Video [/PHP]turns into "asdf" </p><p> Then set the m variable to this </p><p> m=asdf </p><p> So both URL's will still go to the same product </p><p></p><p></p><p></p><p></p><p>yoursite.com/play.php?m=asdf yoursite.com/Some-Cool-Video </p><p></p><p>mod_rewrite can do lots of other important stuff too, Google for it and get it activated on your server (it's probably already installed.)</p><p></p><p> You have different choices. One on them is creating a folder named "profile" and rename your "profile.php" to "default.php" and put it into "profile" folder. and you can give orders to this page in this way:</p><p> Old page: <a href="http://something.com/profile.php?id=a&abc=1" target="_blank">http://something.com/profile.php?id=a&abc=1</a></p><p> New page: <a href="http://something.com/profile/?id=a&abc=1" target="_blank">http://something.com/profile/?id=a&abc=1</a></p><p> If you are not satisfied leave a comment for complicated methods.</p></blockquote><p></p>
[QUOTE="galleline, post: 16546605, member: 170042"] Just add .htaccess file to the root folder of your site(for example, /home/domains/domain.com/htdocs/) with following content: [PHP]RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php[/PHP]First, verify that the mod_rewrite module is installed. Then, be careful to understand how it works, many people get it backwards. You don't hide urls or extensions. What you do is create a NEW url that directs to the old one, for example The URL to put on your web site will be yoursite.com/play?m=asdf or better yet yoursite.com/asdf Even though the directory asdf doesn't exist. Then with mod_rewrite installed you put this in .htaccess. Basically it says, if the requested URL is NOT a file and is NOT a directory, direct it to my script: [PHP] RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /play.php [L] [/PHP]Almost done - now you just have to write some stuff into your PHP script to parse out the new URL. You want to do this so that the OLD ones work too - what you do is maintain a system by which the variable is always exactly the same [B]OR[/B] create a database table that correlates the "SEO friendly URL" with the product id. An example might be /Some-Cool-Video (which equals product ID asdf) The advantage to this? Search engines will index the keywords "Some Cool Video." asdf? Who's going to search for that? I can't give you specifics of how to program this, but take the query string, strip off the end [PHP] yoursite.com/Some-Cool-Video [/PHP]turns into "asdf" Then set the m variable to this m=asdf So both URL's will still go to the same product yoursite.com/play.php?m=asdf yoursite.com/Some-Cool-Video mod_rewrite can do lots of other important stuff too, Google for it and get it activated on your server (it's probably already installed.) You have different choices. One on them is creating a folder named "profile" and rename your "profile.php" to "default.php" and put it into "profile" folder. and you can give orders to this page in this way: Old page: [URL]http://something.com/profile.php?id=a&abc=1[/URL] New page: [URL]http://something.com/profile/?id=a&abc=1[/URL] If you are not satisfied leave a comment for complicated methods. [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom