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 8310531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:29:35+00:00 2026-06-08T19:29:35+00:00

Im developing a website which supports SEF urls. I use PHP as serverside language.

  • 0

Im developing a website which supports SEF urls. I use PHP as serverside language. I know htaccess basic codes how works with it. But the problem is if I want to rewrite a php get link I have to put each both links on htaccess like this.

RewriteRule ^sign-in$ index.php?view=signin
RewriteRule ^register$ index.php?view=register
RewriteRule ^jobs$ index.php?id=2 

Is there any possible way to automate urls with htaccess and url particular alias instead of adding Rewrite rules manually? something like joomla? I was trying to understand how joomla htaccess connects with particual alias. But I still couldn’t understand how it works. I cant uderstand how joomla htaccess makes relationship with article aliases. Please help. Thanks in advance.

  • 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-08T19:29:36+00:00Added an answer on June 8, 2026 at 7:29 pm

    If there isn’t any difference for how an id looks like compared to how a view looks like (in your example, register is a view and jobs is an id=2), then you have to do one or the other individually:

    To “automate” the views you could try just doing this:

    RewriteEngine On
    
    # all id's here:
    RewriteRule ^jobs$ index.php?id=2 [L] 
    RewriteRule ^something-else$ index.php?id=3 [L]
    RewriteRule ^another$ index.php?id=4 [L]
    
    # this will do all views
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?view=$1 [L]
    

    EDIT: If you need to do these mappings via an external set of aliases, you need to take a look at the RewriteMap directive. You will need to have access to the server or vhost configs in order to setup the map, but your rules can stay in an htaccess file.

    Say you have a text file called “joomla_maps.txt” that looks like:

    jobs id=2
    another id=3
    sign-in view=sign-in
    register view=register
    

    etc…

    You can use that mapping by setting it up in a RewriteMap (in vhost/server config)

    RewriteMap joomla txt:/path/to/joomla_maps.txt
    

    And later in your htaccess:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?${joomla:$1} [L]
    

    Take a look through the RewriteMap docs to get some examples of other kinds of maps, including executing a script or using a dbm hash map.

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

Sidebar

Related Questions

can we use JQ insted of php for developing website. which one is more
I'm currently developing a website which stores bookmarks in a MySQL database using PHP
I am developing a website which needs to support multiple langauges. I know that
I am developing a PHP website which will generate several approval requests. My approval
I am developing a website which display some products in a grid. All products
I am developing a website which is extensively using jquery dom javascript ajax etc.
I am developing a website in which a cookie is set when the user
I am developing a website in which i want to give a search functionality
I am developing an eCommerce website which contains around 2000-3000 products(no.can be increase in
I've recently started developing a portfolio website which I would like to link to

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.