GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   wordpress site to html - moving pages without extensions ex: http://site.com/page (https://gfy.com/showthread.php?t=1031727)

kush 07-26-2011 09:45 AM

wordpress site to html - moving pages without extensions ex: http://site.com/page
 
I need help converting a small wordpress site with an unfavorable URL structure to a straight html site, while maintaining the original URL structure.


There are several pages on the current wordpress based site that have urls like the following:

http://site.com/page
http://site.com/another-post
http://site.com/no-trailing-slash-or-extention

As an extra quirk, the original site redirects the www. version to non-www. and I have this in my .htaccess to maintain that redirect:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.site.com
RewriteRule (.*) http://site.com/ [R=301,L]

I'm stuck with how to handle this, can't find an easy answer anywhere.
Thanks.

moeloubani 07-26-2011 10:07 AM

two things, if you want it to redirect to the www. version then go to your settings in WP and go to General and change those to www. where it has the location of the site (both places)

tada now it redirects to original

as to how you can make it so blabla.com/page goes to blabla.com/page.html you just need to make a folder called page so

blabla.com/page/index.html

that way when someone goes to blabla.com/page they will see only blabla.com/page but they will be at blabla.com/page/index.html

good luck

kush 07-26-2011 10:51 AM

Quote:

Originally Posted by moeloubani (Post 18308567)

as to how you can make it so blabla.com/page goes to blabla.com/page.html you just need to make a folder called page so

blabla.com/page/index.html

that way when someone goes to blabla.com/page they will see only blabla.com/page but they will be at blabla.com/page/index.html

good luck


I tried that already, and when you visit blabla.com/page with the file/folder setup you described above, it redirects to http://blabla.com

Your way may work, but I think I would have to tweak the RewriteCond in the .htaccess code. And I'm not sure what "tweak" to do the the .htaccess if this is the case.

fris 07-26-2011 11:46 AM

if you have the same strucure setup in the xhtml version why do you need to rewrite?

kush 07-26-2011 12:22 PM

Quote:

Originally Posted by fris (Post 18308844)
if you have the same strucure setup in the xhtml version why do you need to rewrite?

I bought the original website because it was established with some decent backlinks.

The original site had a rewrite through wordpress to make the site go from http://www.site.com to http://site.com.

To preserve the integrity of the backlinks to existing pages, I am making my new version of the site following this original pattern.

I suppose I could do a permanent 301 redirect on those original existing inner pages to work around the problem.

harvey 07-26-2011 01:22 PM

Quote:

Originally Posted by kush (Post 18308958)
I bought the original website because it was established with some decent backlinks.

The original site had a rewrite through wordpress to make the site go from http://www.site.com to http://site.com.

To preserve the integrity of the backlinks to existing pages, I am making my new version of the site following this original pattern.

I suppose I could do a permanent 301 redirect on those original existing inner pages to work around the problem.

and why don't you simply use WP and keep the links as they are while getting advantage of the many features of WP?


All times are GMT -7. The time now is 09:50 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123