Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    Default Htaccess problems at ~user path

    Hi,

    I would like to reach my website like this: http://domain.com/~user. This works fine, but my our own CMS's url interpreter redirects the page to index.php and the url is processed by the index.php.
    The redirection code form the CMS's htaccess file:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    The CMS's url structure works like this:
    http://domain.hu/contact/ <- this is the contact page

    The problem comes form this structure, because an 'index.html' is put to the end of the url (http://domain.hu/contact/index.html), which file doesn't exists (and I recieve a redirection error screen).
    I couldn't find the redirection, which put's the 'index.html' after the url (httpd.cong negativ, htaccess files negativ). I tried to play with the CMS htaccess file (redirect the url with index.html to non-index.html), but I didn't manage to solve the problem

    I'm out of ideas, neither the system administrator could help me.

    Thank you!

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Mar 2003
    Location
    NC
    Posts
    725
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    The easy fix for this is to modify your local computer hosts file to point to the new server IP.

  3. #3
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,066

    Default Friendly moderator note

    I moved this thread to a more appropriate category since it does not directly address cPanel-related development issues.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,893
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Quote Originally Posted by korex View Post
    Hi,

    I would like to reach my website like this: http://domain.com/~user. This works fine, but my our own CMS's url interpreter redirects the page to index.php and the url is processed by the index.php.
    The redirection code form the CMS's htaccess file:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    The CMS's url structure works like this:
    http://domain.hu/contact/ <- this is the contact page

    The problem comes form this structure, because an 'index.html' is put to the end of the url (http://domain.hu/contact/index.html), which file doesn't exists (and I recieve a redirection error screen).
    I couldn't find the redirection, which put's the 'index.html' after the url (httpd.cong negativ, htaccess files negativ). I tried to play with the CMS htaccess file (redirect the url with index.html to non-index.html), but I didn't manage to solve the problem

    I'm out of ideas, neither the system administrator could help me.

    Thank you!
    It seems to me you'd have to get the domain working properly to use shortened URLs as it appears your CMS wants to do, or disable those rules in your CMS htaccess for it, so that your site works as expected.

  5. #5
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default

    I'd be curious if your index.php is using a location header.

    Hypothesis:
    index.php will retrieve the REQUEST_URI from $_SERVER super global (PHP: $_SERVER - Manual). Then the CMS uses it's own URI parser to determine what page needs to be served, and if necessary, will build the 'proper' URL and push headers with a defined "Location", (PHP: header - Manual)

    If this is true, you could simply modify the CMS's URI parser and make it bend to your will
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  6. #6
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    Default Solved

    Hi,

    I finally solved the problem with the modification of the php interpreter (and changing the links on the site). I wanted to avoid this, because I thought maybe there's a simple solution/settings for this.

    Thanks for the replies, and sorry for putting this post at the wrong forum.

Similar Threads & Tags
Similar threads

  1. Replies: 0
    Last Post: 12-28-2010, 07:42 PM
  2. Htaccess problems at ~user path
    By korex in forum cPanel Developers
    Replies: 1
    Last Post: 06-16-2010, 08:56 AM
  3. AuthUserFile path in .htaccess
    By kbown in forum Security
    Replies: 1
    Last Post: 08-08-2007, 05:19 AM
  4. path for user
    By netnameus in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 07-03-2006, 03:23 PM
  5. home path for user is alias,
    By paralard in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-06-2003, 12:01 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube