Mobile app version of vmapp.org
Login or Join
Murphy175

: URL rewriting on multiple domains hosted on one GoDaddy account Note: I think this question has been asked before but no clear solutions have been discovered. I had developed a site in PHP

@Murphy175

Posted in: #Godaddy #Htaccess #UrlRewriting

Note: I think this question has been asked before but no clear solutions have been discovered.

I had developed a site in PHP that uses clean URLs:

For example:
example.com/about www.example.com/about-us example.com/careers

I had .htaccess file redirect every request to index.php, which decides which content to send to browser by looking up the query string:

# Turn on URL rewriting
RewriteEngine On

# Protect application and system files from being viewed
RewriteRule ^(includes|model) - [F,L]

# 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/
RewriteRule .* index.php/[CO] [PT,L]


This worked well until the hosting package got expired and I was asked to move the site to an existing GoDaddy account that hosts multiple domains under one hosting by creating subdirectories under root site and adding unlimited number of addon domains. This setup broke my site.

Now I am getting this in browser:

Not Found

The requested URL /directoryname/home was not found on this server.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

The original .htaccess is already there. After reading around, I also added following to root site .htaccess:

addhandler x-httpd-php5-cgi .php
addhandler x-httpd-php5-cgi .php5


But still no avail. Is there a solution that can allow using URL rewriting on a GoDaddy hosting setup with multiple domains under one account?

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme