Hotel links problem

Matiaser

Member
Feb 14, 2013
39
5
Helle Devbest!
I have a strange problem with links to my hotel, everything worked fine until I switched to IIS from Xampp. Hotelname.com/me works fine, but hotelname.com/profile/MrGreen or hotelname.com/article/7 I get error.
Hotelname.com/index.php?url=news&id=7 the news page works fine, so its not the page itself

This it the error "code"

Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Thank you!
 
Last edited:

Matiaser

Member
Feb 14, 2013
39
5
This is my web.config

Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1">
                    <match url="^(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 2">
                    <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 3">
                    <match url="^(.*)\.htm$" />
                    <action type="Rewrite" url="{R:1}.php" />
                </rule>
                <rule name="Imported Rule 4">
                    <match url="^(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="dash.php?page={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 5">
                    <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="dash.php?url={R:1}" appendQueryString="false" />
                </rule>
                    <rule name="Imported Rule 1-1">
                    <match url="^habbo-imaging/badge/([^/]+)" ignoreCase="false" />
                    <action type="Rewrite" url="/habbo-imaging/badge.php?badge={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 2-1">
                    <match url="^habbo-imaging/head/([^/]+)" ignoreCase="false" />
                    <action type="Rewrite" url="/habbo-imaging/head.php?figure={R:1}" appendQueryString="false" />
                </rule>
            </rules>
            
        </rewrite>
    </system.webServer>
</configuration>
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
This is my web.config

Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1">
                    <match url="^(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 2">
                    <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 3">
                    <match url="^(.*)\.htm$" />
                    <action type="Rewrite" url="{R:1}.php" />
                </rule>
                <rule name="Imported Rule 4">
                    <match url="^(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="dash.php?page={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 5">
                    <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="dash.php?url={R:1}" appendQueryString="false" />
                </rule>
                    <rule name="Imported Rule 1-1">
                    <match url="^habbo-imaging/badge/([^/]+)" ignoreCase="false" />
                    <action type="Rewrite" url="/habbo-imaging/badge.php?badge={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 2-1">
                    <match url="^habbo-imaging/head/([^/]+)" ignoreCase="false" />
                    <action type="Rewrite" url="/habbo-imaging/head.php?figure={R:1}" appendQueryString="false" />
                </rule>
            </rules>
          
        </rewrite>
    </system.webServer>
</configuration>
No where in there does it link to the news or the profile. Come on dude, fucking read it .
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Do you think I 'd asked for help if I had a clue how to fix it?
You shouldn't be running a hotel if you have absolutely 0 common sense. I have led you to the problem and you have multiple examples of what you need to do

hotelname.com/profile/MrGreen
<rule name="Common Sense 1">
<match url="^index.php?url=news&id=([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
<action type="Rewrite" url="index.php?url=profile&amp;user={R:1}" appendQueryString="false" />
</rule>

Hotelname.com/index.php?url=news&id=7
<rule name="Common Sense 2">
<match url="^news/([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
<action type="Rewrite" url="news/{R:1}" appendQueryString="false" />
</rule>`
<rule name="Common Sense 3">
<match url="^news/([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
<action type="Rewrite" url="index.php?url=news&amp;id={R:1}" appendQueryString="false" />
</rule>`
^ This one I am not sure where your news page actually is or how it reads. Use these both.
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Everyone including you started somewhere, he didnt know what to do and asked for help, take it easy on him jesus





And you know how he has returned and helped the community?
His one post:

On 76 % ?

He is not trying for himself - he wants to be spoon fed how to do things. I do not like people who

1) Expect to own a hotel and are not willing to actually figure out what is going on
2) Do not give back to the community in any way
3) Do not try to figure out solutions on their own.
 

Users who are viewing this thread

Top