Jump to content

Recommended Posts

Hi guys, all i am trying to do is re-write my php pages to look like html pages.

 

i found this code on the internet

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm$ $1.php [nc]

 

i have enabled mod rewrite on my apache server. and saved the .htaccess file in the route of my site.

 

It does absolutley nothing and my http://localhost/index.php stay as http://localhost/index.php

 

ive attached an image to show that my .htaccess file is saved in route

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/162917-solved-php-htacess-rewrites/
Share on other sites

well, your rewrite should work with no problems, and you're not getting a 500 error (which is a way to tell if your htaccess is messed up), so have you restarted your server after you changed your apache configuration files?

thanks for the help,

 

i restarted my apache server, i am using easy php which came with apache if that makes any difference.

 

the link code im using is this

<div id="toplinks">
	<a href="../index.php">Home - </a>
        <a href="../userlogin.php">Login - </a>
        <a href="../Register.php">Register</a>
       

    </div>

 

I dont know if that makes a difference.

 

also i had to manual go into the C:\Program Files\EasyPHP 3.0\apache\conf

file to enable the mod rewrite function.

 

i dont know what else i should do

I'm not sure how much I could help you, but I can point you in the right direction, there is a forum (right here on phpfreaks.com) its called Apache Installation or whatever, they're all more experienced with modding a server than I am, I simply use them :)

 

Sorry I wasn't much help, wish you the best!

Im using php my admin, which came with apache etc.

im not sure if my .htaccess file is in the right place.

Anyone that has used easy php please help. i cant seem to find an .htaccess file in the apache folder so i stuck it in the www folder where my website is saved.

 

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.