Dumb ULR question

Status
Not open for further replies.


Create a folder for it (ie: create a folder named page1)

Rename page1.php to index.php and move it into the page1 folder.
 
Yes, but it would be more easily done (in my opinion) to do a PHP redirect:

Code:
<?php
header("Location: page1.php");
?>
 
if you want to do it through .htaccess google mod rewrite. You can do it without creating folders that way.
 
How can i mage it when a person goes to www.mysite.com/page1 they get the actual page one and they don't have to go to www.mysite.com/page1.php

# if it's not already on
RewriteEngine on

# requested file doesn't exist
RewriteCond %{REQUEST_FILENAME} !-f
# no . (dot) in filename
RewriteCond %{REQUEST_FILENAME} ^[^.]+$
# add .php to filename
RewriteRule (.*) /$1.php [L]


also, would there be a way to redirect www.Mystie.com/Page1 to www.Mystie.com/Page1.php with an .htaccess file or something?

# if it's not already on
RewriteEngine on

# requested file doesn't exist
RewriteCond %{REQUEST_FILENAME} !-f
# no . (dot) in filename
RewriteCond %{REQUEST_FILENAME} ^[^.]+$
# add .php to filename & 301 redirect
RewriteRule (.*) http://%{HTTP_HOST}/$1.php [R=301,L]


Gumby!
 
Status
Not open for further replies.