Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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
  #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
  #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






Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.