solution for wrong links via mod rewrite?

Hi and thanks for reading my question. Its my first so please be gentle as im not a programmer but a barge captain, and curious ))

The situation:

I run a small website and we want to serve more languages, the website is based on Wordpress multisite. After trying various translation solution we decided to go with transposh.

That plugin enables us to translate content easily and it becomes available at domain.com/en domain.com/fr etcetera those directory┬┤s are virtual.

As we have different domain names for different languages i needed a solution to have the content of domain.com/en on domain2.com

What i did was to set the cache directory (static html) of domain.com as webroot of domain2.com. A fairly simple solution and it works like a charm.

The only problem i face is that the menu items link back to the domain.com and not domain2.com

I tried to make urls relative via wp core and two plugins but as the trailing /en or /fr is virtual making the urls relative just links back to domain.com

I have spend two days googling and im realy out of ideas. I tried different php script for search and replace, cgi scripts, perl scripts but none seem to do the job. I dont have shell access.

I was wondering if its posible to do smth like that with mod rewrite and if posible then how?

simply put:

static html site with wrong links can i change the links via htaccess or other method which is easy (relatively) to understand and maintain?

The cache gets rebuild now and then of course

Solutions

This is solved by an other approach:

Instead of using the cache i creatd a cronjob with wget:

/usr/bin/wget -np -P /destination-eg-yourwebroot/ --html-extension -nH -p -k -r http://domain.com

This creates a html copy of your website in the webroot of the new domain For some reason wget does not always update the links in the copy, so they will point to original domain

We can run the command again but then prepend it with /usr/bin/wget -nc -k

/usr/bin/wget -nc -k -np -P /destination-eg-yourwebroot/ --html-extension -nH -p -k -r http://domain.com

It will update the links correctly, including css urls

U now have a clean copy of your website on a different domain

Similar questions

Can't access a subfolder due to WordPress mod-rewrite
I've got a WordPress site installed here: http://www.r-bloggers.com And I wish to install another WordPress site under the /lang directory: http://www.r-bloggers.com/lang/ I created the subfolder and uploaded the files, but when I navigate to the folder, the site keeps telling me it's a 404 page of the root directory website. I imagine this has som...
Cant create new pages - wordpress. Possible Mod-rewrite error?
I've changed my permalink structure to be /%year%/%monthnum%/%day%/%postname%/ through wordpress, however, when I go to create a page it does not seem to work. My .htaccess looks like: Do I need to add a new "ifModule" in there for pages? If so, please provide one. Thanks,
.htaccess, mod-rewrite and Wordpress
I have inherited a wordpress project and am having some problems with rewriterules in the .htaccess file. I am trying to set it up such that this url: site.com/meet-your-team/something/somethingelse returns site.com/meet-your-team/index.php?page_id=30&param2=something&param3=somethingelse This worked without any problems when it was hosted ...
Wordpress permalinks (mod rewrite)
I'm trying to get Wordpress up and running in a directory (/blog), but as there's a .htaccess file in the root directory I think it's conflicting when I turn on permalinks. When I try to visit a page such as http://www.domain.com/blog/2011/03/article-name/ I get a 404. I can however, visit http://www.domain.com/blog/ Here's the .htaccess from the r...
Help on Restructure URLs (Move Parts of URL) with Mod-Rewrite
I have a multi-language WordPress website where the URL has the following URL structure: http://www.domain.com/yyyy/mm/dd/abcdefg/xx-yy/ where xx-yy is the language code. I intend to make the URL as below: http://www.domain.com/xx-yy/yyyy/mm/dd/abcdefg/ Where the language code in URL has been moved to the front. Anybody has any idea what mod-rewrit...
mod rewrite to route based on a uri segment (wordpress permalink)
Wordpress Experts: So, my wordpress instance is currently set to use friendly urls. My current rewrite rules look something like this: Which basically means: send everything to index.php for dispatching. What I NEED to do, is whenever someone accesses my page /promo, I send the rest of the uri to that controller (which is a file promo.php attached ...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.