Own cms

Results 1 to 8 of 8
  1. #1
    Enthusiast Tietoturva is offline
    MemberRank
    Sep 2012 Join Date
    42Posts

    sad Own cms

    I've been working on my own cms, but when my vps ended I needed to continue with xampp, and only problem is now that I don't know how to convert web.config to .htaccess :p

    here's my web.config:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="First">
                        <match url="^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$" />
                        <action type="Rewrite" url="index.php?var1={R:1}&amp;var2={R:2}&amp;var3={R:3}&amp;var4={R:4}" />
                    </rule>
                    <rule name="Second">
                        <match url="^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$" />
                        <action type="Rewrite" url="index.php?var1={R:1}&amp;var2={R:2}&amp;var3={R:3}" />
                    </rule>
                    <rule name="Third">
                        <match url="^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$" />
                        <action type="Rewrite" url="index.php?var1={R:1}&amp;var2={R:2}" />
                    </rule>
                    <rule name="Fourth">
                        <match url="^(|[a-zA-Z0-9_-]+)(|/)$" />
                        <action type="Rewrite" url="index.php?var1={R:1}" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
    And here's what we got to .htaccess
    Code:
    # Turn on URL rewriting
    RewriteEngine On
    
    # Installation directory
    RewriteBase /
    
    # Protect hidden files from being viewed
    <Files .*>
     Order Deny,Allow
     Deny From All
    </Files>
    
    # Allow any files or directories that exist to be displayed directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # Rewrite all other URLs to index.php/URL
    RewriteRule .* index.php/$0 [PT]
    The index works, but when I go to /register it still shows login page -.- and when I login and goes to /me it says it has a redirect loop


  2. #2
    Novice GoozeChaze is offline
    MemberRank
    Aug 2014 Join Date
    4Posts

    Re: Own cms

    No problem man, i'll convert it for you as soon as I can. And please PM me your CMS base even if it's from scratch.
    Last edited by GoozeChaze; 03-08-14 at 07:10 PM.

  3. #3
    Enthusiast Tietoturva is offline
    MemberRank
    Sep 2012 Join Date
    42Posts

    Re: Own cms

    Quote Originally Posted by GoozeChaze View Post
    No problem man, i'll covert it for you as soon as I can. And please PM me your CMS base even if it's from scratch.
    The cms is fully done and it is fully functional whit IIS, but I need the .htaccess to get it working on apache.

  4. #4
    Enthusiast Tietoturva is offline
    MemberRank
    Sep 2012 Join Date
    42Posts

    Re: Own cms

    *bump* still haven't gotten this :s

  5. #5
    R.I.P Millercent FatalLulz is offline
    MemberRank
    Nov 2012 Join Date
    AustraliaLocation
    2,248Posts

    Re: Own cms

    http://www.tohtaccess.com/ Go here and simply place yours then convert.

  6. #6
    Enthusiast Tietoturva is offline
    MemberRank
    Sep 2012 Join Date
    42Posts

    Re: Own cms

    Quote Originally Posted by FatalLulz View Post
    http://www.tohtaccess.com/ Go here and simply place yours then convert.
    What it actually worked this time, I tried it long time ago but it didnt work :O

    EDIT: It doesn't work -.- I tried this:
    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    #REWRITE RULES
    #---------------------
    
    #RULE FIRST 
    
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3&var4=$4 []
    
    #RULE SECOND 
    
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3 []
    
    #RULE THIRD 
    
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2 []
    
    #RULE FOURTH 
    
    RewriteRule ^(|[a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1 []
    
    </IfModule>
    and this:
    Code:
    # Turn on URL rewriting
    RewriteEngine On
    
    # Installation directory
    RewriteBase /
    
    # Protect hidden files from being viewed
    <Files .*>
     Order Deny,Allow
     Deny From All
    </Files>
    
    # Allow any files or directories that exist to be displayed directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # Rewrite all other URLs to index.php/URL
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3&var4=$4 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1 []
    Both gived server errors
    Last edited by Tietoturva; 05-08-14 at 12:10 PM.

  7. #7
    R.I.P Millercent FatalLulz is offline
    MemberRank
    Nov 2012 Join Date
    AustraliaLocation
    2,248Posts

    Re: Own cms

    Only use;

    Code:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3&var4=$4 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1 []

  8. #8
    Enthusiast Tietoturva is offline
    MemberRank
    Sep 2012 Join Date
    42Posts

    Re: Own cms

    Quote Originally Posted by FatalLulz View Post
    Only use;

    Code:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3&var4=$4 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2&var3=$3 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1&var2=$2 []
    RewriteRule ^(|[a-zA-Z0-9_-]+)(|/)$ index.php?var1=$1 []
    Oh sorry I forgot to mention that I fixed this. It actually worked, but had to take [] off to work.



Advertisement