Welcome to WebmasterWorld Guest from 54.145.136.73

Forum Moderators: Ocean10000 & incrediBILL & phranque

Rewrite question.assistance please guys

folder redirection

   
10:47 am on Aug 5, 2007 (gmt 0)

5+ Year Member



ok guys.

I have a custom php/mysql based site and for SEO friendliness it has a section that contains php generated SE friendly html links/files.(I have sitemaps also etc)

Here's the issue:

I have a directory:

mysite/seolove/

and within that there is only an index.php that when called runs the seo engine bit and generates a nice SE index of the entire site with all links etc (it is dynamic content)

I want to call that page with mysite/seolove/index.html

so I can add it to the xml sitemap as a site summary in effect and as the top weighted link in the map. I will also add the sub links seperately (not sure if this is bad practice?)

What's the best way to accomplish this please?

At present when I call www.mysite/selove/index.php, it is just putting:

www.mysite/selove/

in the address bar.

So basically I want to force it to display

www.mysite/selove/index.html which is in turn a

redirection of

www.mysite/selove/index.php

Hope that makes sense!
thanks for your time

7:20 pm on Aug 5, 2007 (gmt 0)

5+ Year Member



RewriteEngine on
RewriteRule selove/index.php [%{HTTP_HOST}...] [R,L]
RewriteRule selove/index.html /selove/index.php [L]

UNTESTED!

Milan

11:13 am on Aug 6, 2007 (gmt 0)

5+ Year Member



thanks milan!

Will try this and post back :)
cheers

11:23 pm on Aug 6, 2007 (gmt 0)

5+ Year Member



ok.

Well, unfortunately it hsa only part worked (where is JD Morgan when you need him? :) )

Basically, the URL /mysite/seolove/

is being re written as /mysite/seolove/index.php

However the index.php is not being rewritten to .html!
Is it possible to rewrite a rewrite? I guess not!

So, if I type in /mysite/seolove/index.html

I get a 404 error

It feels like this puzzle is 'nearly' solved but the final piece is missing?!

Can anyone here please fit the final piece to my re write jigsaw?!

I need /mysite/seolove/

that actually points to

/mysite/seolove/index.php

rewriting to a .html extension instead of a .php

This is my current .htaccess for this directory

Options FollowSymLinks
php_value session.use_trans_sid 0
RewriteEngine on
//***************************
Lots more working code****************//the new code//

RewriteRule list/index.php [%{HTTP_HOST}...] [R,L]
RewriteRule list/index.html /list/index.php [L]

THANKS

2:58 am on Aug 7, 2007 (gmt 0)

5+ Year Member



I thought of trying to switch the rules but that will create an infinite loop!

Milan

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month