Jump to content

Recommended Posts

I've enabled it in the apache module.

 

Check phpinfo() and it's there.

 

I've done this..

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #

 

I still can't get it to rewrite

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^home\.php$ index.php 

 

The way I'm getting to index.php is a link on the page or typing it manually in the url. Restarted wamp several times.

Where have you placed this code

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^home\.php$ index.php 

 

You should of placed it within a .htaccess file (thats the exact name) which should be located into root of WAMP's www folder (eg C:/wamp/www). You do not need to restart Apache each time you modify the .htaccess file, as it is read on every http request to the server. You only need to restart Apache if you make changes to the main configuration file(s).

  • 1 year later...

Just to confirm, you are testing this by using the URL http://localhost/home.php correct? If you aren't, you should be because that rule will take requests for home.php and display index.php. If you are and it's not working, the rewrite pattern should probably be...

 

RewriteRule ^home\.php$ /index.php 

 

Though this should cause a 404 error as mentioned previously. Is Wampserver perhaps not set-up to throw proper errors?

 

 

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.