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

  • SEARCH
  • Home
  • 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 7941381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:39:15+00:00 2026-06-03T23:39:15+00:00

I want to hide index.php from the URL but it doesn’t work at all.

  • 0

I want to hide “index.php” from the URL but it doesn’t work at all. I have tried lot of stuff through google, stack but it did not help me at all. I have the following rules specified in my .htaccess file. Also when I access the URL using “https://www.domain.com/index.php/login” it works fine but when I access the site using “https://www.domain.com/login” then it shows 404 page (Page not found). I am not sure if I am missing something. [Note: I am using symfony 1.4, I also tried using the filters like http://www.symfony-project.org/plugins/lapeSSLFilterPlugin for handling ssl but it doesn’t work. I have also checked the error log for ssl but I am not getting any relevant error in the log.]

Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
   RewriteEngine On

   # uncomment the following line, if you are having trouble
   # getting no_script_name to work
   RewriteBase /

   # we skip all files with .something
   #RewriteCond %{REQUEST_URI} \..+$
   #RewriteCond %{REQUEST_URI} !\.html$
   #RewriteRule .* - [L]

   # we check if the .html version is here (caching)
   RewriteRule ^$ index.html [QSA]
   RewriteRule ^([^.]+)$ $1.html [QSA]
   RewriteCond %{REQUEST_FILENAME} !-f

   # no, so we redirect to our front web controller
   RewriteCond %{SERVER_PORT} !^443$
   RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI}        [R=301,L]
   RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

The ssl.conf file contains the below entires:

LoadModule ssl_module modules/mod_ssl.so
Listen 443

<VirtualHost _default_:443>
  DocumentRoot /var/www/html/domain/web
  ServerName www.domain.com
  RewriteEngine On
  DirectoryIndex index.php
  Alias /sf /var/www/html/domain/lib/vendor/symfony/data/web/sf
  <Directory "/var/www/html/domain/lib/vendor/symfony/data/web/sf">
      AllowOverride All
      Allow from All
  </Directory>
  <Directory "/var/www/html/domain/web">
      AllowOverride All
      Allow from All
  </Directory>

  ErrorLog logs/ssl_error_log
  TransferLog logs/ssl_access_log
  LogLevel warn

  SSLEngine on
  SSLCertificateFile /etc/ssl/certs/domain.com.crt
  SSLCertificateKeyFile /etc/ssl/certs/domain.key
  SSLCertificateChainFile /etc/ssl/certs/gd_bundle.crt
  SSLCACertificateFile /etc/ssl/certs/gd_bundle.crt
</VirtualHost>

The httpd.conf file contains the below vhost settings:

<VirtualHost *:80>
   ServerName www.domain.com
   DocumentRoot "/var/www/html/domain/web"
   DirectoryIndex index.php
   RewriteEngine On
   <Directory "/var/www/html/domain/web">
     AllowOverride All
     Allow from All
   </Directory>
   Alias /sf /var/www/html/domain/lib/vendor/symfony/data/web/sf
   <Directory "/var/www/html/domain/lib/vendor/symfony/data/web/sf">
      AllowOverride All
      Allow from All
   </Directory>
</VirtualHost>

Any help will be greatly appreciated.

  • 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-03T23:39:17+00:00Added an answer on June 3, 2026 at 11:39 pm

    Probles is in you symfony configuration.
    All apache config files is ok.

    You need add this in global security.yml

    default:
      is_secure: false
      is_ssl: true
    

    sfGuardAuth/config/security.yml

    secure:
      is_secure: false
      is_ssl: true
    
    signin:
      is_secure: false
      is_ssl: true
    
    signout:
      is_secure: false
    

    And if you want no “index.php” in your URLs set

    no_script_name:         true
    

    in your global app settings.yml

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

Sidebar

Related Questions

I want to hide any request on the following php file to www.example.com/. www.example.com/index.php
I have tried to explode the returned array and it just doesn't want to
I have never before rewritten a URL except for removing the index.php part of
I want to hide the rows from row index from 1 to 3. The
I have a page (index.php) that pulls posts from mysql database. The posts are
Let's say I have 10 buttons. I want to hide all the buttons except
I want to hide all mysql error messages without using mysql_error() . Are there
I want to hide all the descendents of the ul for my tree menu
I want to hide text which is in <span> . but why it's not
Magento Production version 1.2.1 store running on linux centos. I want to hide all

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.