Jump to content

Just want to mask php file names


deansaddigh

Recommended Posts

Basically i have written this

 

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

 

All i want to do at this stage is mask php extensions of my pagesto htm.

But it doesnt seem to be working.

 

Im a complete newb and have been trying to figure out how to use this.

 

Can anyone point me inthe right direction please

Link to comment
Share on other sites

If you go to site.com/filename.htm it should call site.com/filename.php

 

Do not assume mod_rewrite will change your links for you. You'll need to change your links from

<a href="path/to/filename.php">some link</a>

to

<a href="path/to/filename.htm">some link</a>

yourself.

 

mod_rewrite will only map the url site.com/filename.htm to site.com/filename.php

Link to comment
Share on other sites

Ok so i have changed my links to.htm and written the rewrite rule

 

htaccess file

 

 

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

 

 

heres my error.

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@languageschoolsuk.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

 

Can anyone see why? is this a hosting issue?

 

Kind regards

 

Dean

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.