Jump to content

Very basic help needed for getting started...


theOlster

Recommended Posts

Hi, I've been phping for some time now but am new to mod_rewrite.  I can't seem to enable it on my server.  I don't have access to the conf file, so I was hoping to enable it via .htaccess.

 

I've tried using some of the examples posted in this forum, but can't get phpinfo to return any mention of mod_rewrite being active.

 

Can someone help me with this?  My server is with 1and1 (oops!) and I'm happy to post the results of phpinfo if required.

 

Thanks...

Link to comment
Share on other sites

  • 2 weeks later...

There are a number of tutorials online for Mod_Rewrite.  A simple google search for mod_rewrite and htaccess will bring up quite a few for you.

 

Also I don't believe that PHP Info will show you the information you're looking for. The best way to check for mod_rewrite (that I've found anyway) is to simply create a quick htaccess file for testing

 

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^test.html$ test.php

 

Next add a quick PHP script called "test.php" to make sure this took.

 

If all went well you should be able to simply type in test.html and test.php will be whats actually displayed.

 

If you get a server 500 error try this htaccess instead. (Some linux distrubutions like Debian tend to error out with followsymlinks on)

 

RewriteEngine on
RewriteRule ^test.html$ test.php

 

if it still fails... Then you'll need to contact your web host to enable the rewrites engine, or find out what weird thing they require you to do to enable it.

Link to comment
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.