Jump to content

Recommended Posts

Hello.

Sure would appreciate some help with this voodoo.

I am a total beginner with mod_rewrite.

At this point I am just trying to understand whether there is something up with my syntax or something with the hosting.

 

I have this very simple file to test if mod_rewrite is even working:

 

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteRule hello\.html hello2.html
</IfModule>

 

Navigating to http://xxx.xx.xxx.xx/hello.html, the server returns this error:

The requested URL /usr/home/cen887/www/htdocs/hello2.html was not found on this server.

 

I can navigate directly to http://xxx.xx.xxx.xx/hello2.html no problem.

 

The hosting company used this to prove that mod_rewrite was active, and it does work:

 

RewriteEngine on
RewriteRule ^(.*) http://www.google.com [L]

 

I guess I am totally perplexed with the above error, since I know that file exists, what would keep the browser from simply navigating to that file using the htaccess file?

 

Thank you very much for any advice!

Link to comment
https://forums.phpfreaks.com/topic/135604-newbie-mod_rewrite-confusion/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.