PDA

View Full Version : mod_rewrite for Zope


deepak
09-13-2007, 02:13 PM
Cry for help...

I recently took over a highly complex website built with zope and I really need some help with rewriting the URLs.

Problem: the entire website is loaded in a frame, which was the previous webmasters solution to the URL problem :rolleyes:. The index page has PR5, all other pages are in the sandbox.

I need to first fix the URLs before I can take it out of the frame (or the company won't recognize their own website).

Now the URLs look like this:
http://IP_address:8080/folder1/folder2/index_htm

I want it to look like this:
http://www.mydomain.com/index_htm

In the Site Root, the Base is defined as:
http://IP_address:8080/folder1/

Site Root is not even explained in the Zope documentation anymore. It only says that it is outdated and very dangerous. Mess with it and you are locked out of your own backend!

I don't have direct access to the server and the people running it don't know / care about this issue. I have to send them the code, they will test it and then upload it.

Can this problem be solved with a simple mod_rewrite, or do I have to mess around with the settings and URL creation in Zope? Does anybody have experience with Zope?
If anybody can help me with the mod_rewrite, I will be very thankful.

whitehat
09-15-2007, 10:11 PM
More information needed on the different types of URLs you are needing to rewrite....

Are you just trying to rewrite ONE url?

http://IP_address:8080/folder1/folder2/index_htm

to http://www.domain.com/index.html

If so this is possible. However if you are trying to re write multiple or dynamic urls you will most likely have to alter the url generation in zope.
I have no experience of this app (and I am glad of this looking at their site!)

as a sidenote...how the heck have they got a PR 5 homepage using an iframe and IP address ??!!

deepak
09-16-2007, 05:59 AM
Thanks for your input Whitehat

It's a big company, that's why the PR5. I guess the Frame is seen to be linking to the index page (traffic shows up as referred in the analytics). But then there is a dead end - javascript links and other problems...

I'm trying to rewrite all URLs. I don't care about the dynamic folders and whatever comes after the www.domain.com, as long as it's not http://IP_address:8080/, which nobody looking at it in Google will be able to recognize.

whitehat
09-16-2007, 01:15 PM
Thanks for your input Whitehat

It's a big company, that's why the PR5. I guess the Frame is seen to be linking to the index page (traffic shows up as referred in the analytics). But then there is a dead end - javascript links and other problems...

I'm trying to rewrite all URLs. I don't care about the dynamic folders and whatever comes after the www.domain.com, as long as it's not http://IP_address:8080/, which nobody looking at it in Google will be able to recognize.

Sounds like a good idea to me.

Dont forget you will need to do a 301 permanent redirect if you wish to keep the page rank of the pages you are renaming.

310 redirect: old page name > new rewritten page name :)