Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7810897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:57:32+00:00 2026-06-02T03:57:32+00:00

I have a mod rewrite working on localhost, but not in godaddy shared host.

  • 0

I have a mod rewrite working on localhost, but not in godaddy shared host.

Options -Multiviews
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{DOCUMENT_ROOT}/WebShop/View/public%{REQUEST_URI} -f
RewriteRule ^(.*)$ WebShop/View/public/$1 [L]

RewriteRule ^(.*)$ entryPoint.php [QSA,L]

The problem is with the RewriteCond part. It cannot find the exsiting files in the subfolder. I tried with absolute path, relative path, rewritebase everything, but neither of them worked. Godaddy doesn’t grant access to the rewritelog… Any idea how to solve this problem?

Edit:

The htaccess is in a subfolder, and in the document root is a htaccess which splits the request by domain into subfolders:

Options -Multiviews
Options +FollowSymLinks

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} ([^\.]+\.[^\.]+)$
RewriteRule ^(.*)$ %1/$1 [L,QSA]

And the real problem is, that the %{REQUEST_URI} in the htaccess of the subfolder contains the name of the subfolder too :S

Edit2:

Ok I have a partial solution:

Options -Multiviews
Options +FollowSymLinks

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_URI} ^/([^/]+)/(.*)$
RewriteCond %{DOCUMENT_ROOT}/%1/WebShop/View/public/%2 -f
RewriteRule ^(.*)$ entryPoint.php?file=%2 [L]

RewriteRule ^(.*)$ entryPoint.php [QSA,L]

This prints the file name if exists, but it’s kind of joke, cause if I change the second rule to

RewriteRule ^(.*)$ x.php [QSA,L]

Then everything goes to the x.php. I’m wondering why mod rewrite never recognize the L flag?

(go drink a beer)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:57:33+00:00Added an answer on June 2, 2026 at 3:57 am

    It’s maybe because of some sort of strange directory settings, but if you redirect to a subDirectory on a godaddy server, you have to create there an empty .htaccess file with RewriteEngine On, otherwise it won’t work.

    The preceding code in the edit2 section works well, but not on a godaddy server… Here is the file access version of it:

    Options -Multiviews
    Options +FollowSymLinks
    
    RewriteEngine On
    
    RewriteBase /
    
    RewriteCond %{REQUEST_URI} ^/([^/]+)/(.*)$
    RewriteCond %{DOCUMENT_ROOT}/%1/WebShop/View/public/%2 -f
    RewriteRule ^(.*)$ WebShop/View/public/%2 [L]
    
    RewriteRule ^(.*)$ entryPoint.php [QSA,L]
    

    And I placed an empty .htaccess file with RewriteEngine On in the “WebShop/View/public” directory, that fixed the L flag problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have the working Mod Rewrite Regex: RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule
I have created a simple mod rewrite for my site: RewriteEngine On RewriteCond %{REQUEST_URI}
I have a really simple mod-rewrite rule : RewriteRule ^(.*)$ index.php?url=$1 [PT,L] As an
I have this rule: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !index.php RewriteRule ^(.*)$ index.php?req=$1
Quick one. I'm using mod rewrite and have most replacements in place: empty space
i have read posts regarding this but that did not gave answer to my
I have not having any luck getting my .htaccess with mod_rewrite working. Basically all
I am trying to figure out Apache's Mod Rewrite and so far it's not
I have a permalink working but as soon as I create a post it
Hi Hi have a working website on localhost that I want to move online.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.