Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP FAQs
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP FAQs This moderated forum is where our PHP experts answer some of the questions they see asked most frequently in the other PHP forums. You cannot post other messages here, use the other PHP forums for that.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP FAQs section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 24th, 2009, 02:30 AM
Authorized User
Points: 75, Level: 1
Points: 75, Level: 1 Points: 75, Level: 1 Points: 75, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default mod_redirect

Hi,

I am trying to configure mod_redirect in my apache. i use following code in my .htaccess file
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/(.*).htm
RewriteRule ^(.*).htm http://www.mysite.com/test/test.php?ho=$1 [L]
My requirement is to display test.php?ho=hi.htm as hi.htm . it displays properly on my site. but not on my localhost, how do i configure it? in my apache.
__________________
divinequran.com
Reply With Quote
  #2 (permalink)  
Old July 27th, 2009, 09:57 AM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

In your main apache config, make sure you've loaded mod_rewrite.

Also make sure that you've enabled .htaccess files:

Code:
AccessFileName .htaccess
<Directory /var/www/your_dir>
  AllowOverride     All
</Directory>
__________________
--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk
Reply With Quote
  #3 (permalink)  
Old August 2nd, 2009, 03:43 AM
Authorized User
Points: 75, Level: 1
Points: 75, Level: 1 Points: 75, Level: 1 Points: 75, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I have directory values as follows

Code:
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>
If it is the issue then the file wont get displayed. but the file is displayed properly
__________________
divinequran.com
Reply With Quote
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off



All times are GMT -4. The time now is 02:10 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.