| Author |
|
calmgoing Newbie

Joined: 31 May 2010
Online Status: Offline Posts: 6
|
| Posted: 31 May 2010 at 11:10pm | IP Logged
|
|
|
Hi guys, I just installed JobberBase1.9 and the URL rewriting it's not working properly. My IDC said they can config the httpd.ini for me but I only have the web.config file. Can anyone convert this for me. I am new to this thing. I am a actionscript developer. Here is my web.config content: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <defaultDocument> <files> <add value="index.php" /> </files> </defaultDocument> <rewrite> <rules> <rule name="RewriteUserFriendlyURL1" stopProcessing="true"> <match url="^([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="?page={R:1}" /> </rule> <rule name="RewriteUserFriendlyURL2" stopProcessing="true"> <match url="^([^/]+)/([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="?page={R:1}&id={R:2}" /> </rule> <rule name="RewriteUserFriendlyURL3" stopProcessing="true"> <match url="^([^/]+)/([^/]+)/([^/]+)/$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="?page={R:1}&id={R:2}&extra={R:3}" /> </rule> <rule name="RewriteUserFriendlyURL4" stopProcessing="true"> <match url="^([^/]+)/([^/]+)/([^/]+)/([^/]+)/$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="?page={R:1}&id={R:2}&extra={R:3}&referer={R:4}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Any help is appreciated.
|
| Back to Top |
|
| |
calmgoing Newbie

Joined: 31 May 2010
Online Status: Offline Posts: 6
|
| Posted: 31 May 2010 at 11:13pm | IP Logged
|
|
|
They have Isapi Rewrite 1.3 running.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Online Posts: 10489
|
| Posted: 01 June 2010 at 2:13am | IP Logged
|
|
|
Are you sure it's v1.3 not v3.1? 'Cause the 1st version was used so long ago and by so few people that I can hardly believe it...
Please confirm and then I'll write the rules for you.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
calmgoing Newbie

Joined: 31 May 2010
Online Status: Offline Posts: 6
|
| Posted: 01 June 2010 at 2:20am | IP Logged
|
|
|
yes, it's 1.3. THe host is in mainland China. They said 1.3 is free, I am quite disappointed at the IDC. But it's very bad for me. I also have host on Godaddy, they do good.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Online Posts: 10489
|
| Posted: 01 June 2010 at 5:41am | IP Logged
|
|
|
You see, version 1 is so obsolete that firstly, it doesn't support much of the suntax neede to covert the above config, and secondly, I can
hardly find a person who still remembers v1 syntax... It's truly obsolete...
I suggest you to find hosting supporting ISAPI_Rewrite 3 (there are quite a lot of them, e.g. http://www.helicontech.com/hosting/).
The rules will be:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ \?page=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/?$ \?page=$1&id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ \?page=$1&id=$2&extra=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ \?page=$1&id=$2&extra=$3&referer=$4 [L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
calmgoing Newbie

Joined: 31 May 2010
Online Status: Offline Posts: 6
|
| Posted: 01 June 2010 at 6:07am | IP Logged
|
|
|
Hi Anton, Yes, if that can't be solved I have to find another host. I chose a host in China because I am marketing that site in China.
Is the above rules based on 3.0 and I can just copy and paste to a notepad make name it httpd.ini? I know about the rewrite URL thing only after I bought the host in China. What should I replace REQUEST_FILENAME with? Thank you very much for you help. Regards, Stephen
|
| Back to Top |
|
| |
calmgoing Newbie

Joined: 31 May 2010
Online Status: Offline Posts: 6
|
| Posted: 01 June 2010 at 6:19am | IP Logged
|
|
|
My IDC just said the rewrite version they have is actually 1.4, I guess that do not make much difference. They gave me a sample httpd.ini for that version too RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$3 RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4 RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4 RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html\?*(.*)$ $1/viewpro\.php\?$2=$3&$4 RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
Do you recall anything? I guess I have to find another host in China. I am really appreciate your help here.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Online Posts: 10489
|
| Posted: 01 June 2010 at 8:11am | IP Logged
|
|
|
The config I provided above should be used as is (REQUEST_FILENAME should NOT be replaced).
But this is the config for v3, so you need to store it in .htaccess file (NOT httpd.ini).
I would highly recommend you to find a hosting supporting ISAPI_Rewrite v3 as previous versions do not support RewriteCond %{REQUEST_FILENAME}
checks which are quite important for you.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
calmgoing Newbie

Joined: 31 May 2010
Online Status: Offline Posts: 6
|
| Posted: 01 June 2010 at 8:28am | IP Logged
|
|
|
Thanks Anton, I do have the .htaccess file, I was told it's for Apache and web.config is for Windows. I have the exact same site working good on Godaddy. Now I bought a host in China I need to worry about the rewrite thing. Anyway, I really appreciate your help, Anton.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Online Posts: 10489
|
| Posted: 01 June 2010 at 9:09am | IP Logged
|
|
|
"I do have the .htaccess file, I was told it's for Apache"
- not only for Apache, but also for ISAPI_Rewrite v3.
__________________ Regards,
Anton
|
| Back to Top |
|
| |