Mod rewrite

SpaceshipSpaceship
SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Watch
Impact
18
hi

does anyone know how to mod rewrite..?

i would like to make my website page in following format


from 'http://domain.com/forums/index.php"

to 'http://domain.com/index"

thanks
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Just the one page? Or do you want rewrite a whole series of pages? Instead of using a filename without an extension like /index, I would recommend adding an extension, like .html to it so its /index.html

The one page is pretty simple. Just create a .htaccess file in your root directory with the following:

Code:
RewriteEngine On

RewriteRule ^index.html forums/index.php

<Files *.html> 
ForceType application/x-httpd-php 
</Files>
<Files *.htm> 
ForceType application/x-httpd-php 
</Files>

Keep in mind though if you're using ModRewrite to direct to a file in a different directory, your HTML may have to be modified if it uses relative paths for the images. Else it will be looking for your images in /images/ instead of /forums/images/ . Same for links. Maybe if you let me know what your intended purpose is I could better assist with some rewrite advice.
 
0
Close
thanks -RJ- for replay

yeah no problem i will use "http://domain.com/forums/" use same url no need to redirect it to "http://domain.com" but how can i make them int to .html

my intention was to just make it search engine friendly

my site will use ip forums
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back