Jump to content

Recommended Posts

Posted

SOLVED.

 

I'm hosted at hostgator, but I hope I can get some help here.

So some of the design on my page is being directed there by php.

&--#60;?php include_once("templateDesign.php"); ?&--#62;

I wanted to remove the file extensions, so you could just type mysite.com/example and the .php extension wouldn't come up. I did this by using this code in my htaccess file:

# Apache Rewrite Rules

&--#60;IfModule mod_rewrite.c&--#62;

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

 

 

# Remove .php-extension from url

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME}\.php -f

RewriteRule ^([^\.]+)/$ $1.php

 

# End of Apache Rewrite Rules

&--#60;/IfModule&--#62;

Now, the problem is it isn't loading the content from the .php correctly. Just some come up, indicating that it reaches the .php file with content, but doesn't load it correctly.

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.   Paste as plain text instead

  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...