|
| Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Join Date: Sep 2005
Location: Duanesburg, NY
Posts: 34
Reputation: 3
|
.htaccess to ADD .php file extensions
This is sort of the opposite of what was discussed here:
http://forum.powweb.com/showthread.p...ht=rewrite+php I used a settings option in my web site’s software (Sunshop) to make our site search friendly with Google and other search engines. For example, rather than displaying "item&id=3780&prevaction=pricelist", it displays "item/id/3780/prevaction/pricelist/". I’d like to use TSEP search engine to index my site for searching. It requires file extensions before it will index the contents of a page. I need it to index the contents of my web site which displays listing details such as Title, Author, Publisher, etc. from within links such as the one shown above. I read that someone used mod_rewrite to make their site search friendly. Rather than displaying "item.php?id=5," for example, they did "item/5“. When using the TSEP search engine to index the site, they ran into a problem because this meant that each page was linked to without a file extension, and thus was not indexed. In order to fix this, they changed their .htaccess file's mod_rewrite entries to the format of "item/5.php". Their site now displays as individual pages for each database entry which they say makes Google happy, and it also continues to have a file extension, which makes TSEP happy. Can someone suggest some code I could enter in a .htaccess file for upload to the server so that my files like the above get a .php extension added to them? Also, information on where to place this .htaccess file relative to the location of htdocs/tsep/ and the files within the tsep folder? |
|
|
|
|
#2 |
|
Join Date: Jul 2005
Location: USA
Posts: 119
Reputation: 41
|
I am using a mod like this for the htaccess forum at askApache.com, where instead of
http://www.askapache.com/htaccess/index.php the url is http://www.askapache.com/htaccess/htaccess-vc1.html and for http://www.askapache.com/htaccess/viewtopic.php?t=5 its http://www.askapache.com/htaccess/ca...pires-vt5.html This rewrites internally all .html files to .php Code:
Code:
Code:
Remove SID for guests phpBB SEO mod rewrites Gives you an htaccess like this- Code:
|
|
|
|
|
#3 | |
|
Join Date: Jul 2005
Location: USA
Posts: 119
Reputation: 41
|
Quote:
They would still be php files, but the extension would be .html, this is basically required if you want any SEO. |
|
|
|
|
|
#4 |
|
Join Date: Jul 2005
Location: USA
Posts: 119
Reputation: 41
|
Ooops, should read like this:
I am using a mod like this for the htaccess forum at htaccesselite.com, where instead of http://www.htaccesselite.com/htaccess/index.php the url is http://www.htaccesselite.com/htaccess/htaccess-vc1.html and for http://www.htaccesselite.com/htaccess/viewtopic.php?t=5 its http://www.htaccesselite.com/htacces...pires-vt5.html This rewrites internally all .html files to .php Code:
Code:
Code:
Remove SID for guests phpBB SEO mod rewrites Gives you an htaccess like this- Code:
Last edited by produke; 10-30-06 at 04:46 AM.. Reason: fix URL= syntax |
|
|
![]() |
| Thread Tools | |
|
|