Go Back   PHP-Editors > Linux, Apache, MySQL > Apache Help

Apache Help Post any question relating to Apache here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2009-04-25, 12:24 AM
Junior Member
 
Join Date: Apr 2009
Posts: 2
ar009 is on a distinguished road
Default Mod Rewrite Help

Hello,
I am new to .htacess.I want to change my daynamic url to static url.
I have tried various option but all are not working.


I have this URL :
http://localhost/current_holiday/region.php?var1=Abu Dhabi

and want to display like
http://localhost/current_holiday/region/Abu Dhabi.html

Any one can help me to sort out this problem....


ThnX in Adcance

Last edited by ar009; 2009-04-25 at 12:38 AM..
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2009-04-25, 10:56 PM
Senior Member
 
Join Date: Dec 2004
Posts: 206
strasm is an unknown quantity at this point
Default

I haven't done this for a while. I hope my syntax is correct. There are a few different ways you could do this. You can make a separate .htaccess file in each directory. If you had a global .htaccess file this is how it would look:

Code:
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteBase /

	RewriteRule ^/(.*)/(.*)/(.*).html$  /$1/$2.php?var1=$3 [L]
	
</IfModule>
Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 2009-07-09, 09:29 PM
Banned
 
Join Date: Mar 2009
Posts: 35
huafei is on a distinguished road
Default

Thanks for the info, I appreciate it.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:11 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.